views:

113

answers:

1

Given the following XML:

<results>  
    <result type="1">pass</result>  
    <result type="2">pass</result>
    <result type="3">pass</result>
</results>

How do I create the XSD that forces the "result" elements to be ordered by the value of the "type" attribute? Also note, I don't necessarily need an ambiguous sort on the "type" attribute. I currently have them as enum values and I am expecting exactly one of each value in this specific order.

A: 

IMHO XSD doesn't supports what you want. You can not express relationship between attributes contained in elements of list

dimba