← Prev in month ← Prev in thread

Providing default elements in XMLSchema differentiated with attribute values

From
Rajan Gupta <>
To
Date
2002-01-23T01:40:08Z
ID
<>
Thread
Providing default elements in XMLSchema differentiated with attribute values
I want to create a schema which enforces that an element with different
values has to be present in the instance of an XML document. e.g.

I want the following elements to be part of the schema always:
<FoodItems>
  <!-- The following 2 elements have to be there in an XML document -->
  <Liquid name="water">
     <qty>100</qty>
  </Liquid>
  <Liquid name="milk">
     <qty>50</qty>
  </Liquid>
  <!-- The following could be optionally there too -->
  <Liquid name="coke">
     <qty>10</qty>
  </Liquid>
</FoodItems>
I can write an XMLSchema for Liquids, but how do I enforce that elements
with water & milk as attribute values are present every time an instance
document is created of the schema.
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Send FREE video emails in Yahoo! Mail!
> http://promo.yahoo.com/videomail/
> 
> ---------------------------------------------------------------------
> In case of troubles, e-mail:     
> To unsubscribe, e-mail:          
> For additional commands, e-mail: 
> 


__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/
← Prev in month ← Prev in thread