If I want to assign different value to different versions as the
followings:
<versions>
<version>
<name> a20 </name>
<value> 10 </value>
</version>
<version>
<name> b40 </name>
<value> 50 </value>
</version>
<version>
<name> others</name>
<value> 5 </value>
</version>
</versions>
I guess it cannot be simplified as below, even if we can use <xs:choice
maxOccurs="unbounded"> to define elements in any order with any
occurrences.. the problem is we cannot identify corresponding value for
each version...
<versions>
<version> a20 </version>
<value> 10 </value>
<version> b40 </version>
<value> 50 <value>
<version> others </version>
<value> 5 </value>
</versions>
Am I right? Could anyone confirm me about this if possible?
Thanks a lot!
jmcgill - 06 Jun 2006 03:04 GMT
> I guess it cannot be simplified as below, even if we can use <xs:choice
> maxOccurs="unbounded"> to define elements in any order with any
[quoted text clipped - 14 lines]
> Am I right? Could anyone confirm me about this if possible?
> Thanks a lot!
It is only because of the way you read it that this is distinct from:
<versions>
<value> 50 <value>
<value> 10 </value>>
<value> 5 </value>
<version> a20 </version>>
<version> b40 </version>
<version> others </version>
</versions>
Although you may be able indicate the ordering of each element as a
sequence.
I liked your first version much, much better.