Hi Folks,

The C programming language specification says that the order of evaluating the 
arguments of a function call is unspecified. So, one cannot rely on the first 
argument being evaluated before the second argument.

Does the DFDL specification explicitly state an order of evaluating the element 
declarations in an xs:choice? If so, where in the specification does it state 
this?

Why do I ask? Because this works:

<xs:choice>
    <xs:element name="foo" type="integer" ... />
    <xs:element name="bar" type="string" .../>
</xs:choice>

but this doesn't work:

<xs:choice>
    <xs:element name="bar" type="string" .../>
    <xs:element name="foo" type="integer" ... />
</xs:choice>

Why doesn't the latter work? Because a string matches anything, so the foo 
element will never be evaluated.

/Roger

Reply via email to