I have a schema that defines a programming language for a script that drives a sequentially executing process. It defines the structure of a script that has to interact with a pre-existing, custom-made XML parsing engine. Part of this is an if-else block that has to be defined as:
<if {condition}>
statements...
<else/>
statements...
</if>
The else and subsequent statements are optional. Also, the statements after else can be any of the statements before else.
This is how I have it defined in the schema:
<xs:element name="if">
<xs:complexType >
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbo unded">
<xs:group ref="general_co mmand"/>
<xs:group ref="macro_cont rol_command"/>
</xs:choice>
<xs:element ref="else" minOccurs="0"/>
<xs:choice minOccurs="0" maxOccurs="unbo unded">
<xs:group ref="general_co mmand"/>
<xs:group ref="macro_cont rol_command"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element
When I try to validate, XMLSPY reports a non-deterministic error, which I believe is because general_command and macro_control_c ommand are reqeated in the same element. I'm wondering if there is any way to get around this error so that the schema will validate, without giving up the structure/functionality that I need?
Thanks!
<if {condition}>
statements...
<else/>
statements...
</if>
The else and subsequent statements are optional. Also, the statements after else can be any of the statements before else.
This is how I have it defined in the schema:
<xs:element name="if">
<xs:complexType >
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbo unded">
<xs:group ref="general_co mmand"/>
<xs:group ref="macro_cont rol_command"/>
</xs:choice>
<xs:element ref="else" minOccurs="0"/>
<xs:choice minOccurs="0" maxOccurs="unbo unded">
<xs:group ref="general_co mmand"/>
<xs:group ref="macro_cont rol_command"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element
When I try to validate, XMLSPY reports a non-deterministic error, which I believe is because general_command and macro_control_c ommand are reqeated in the same element. I'm wondering if there is any way to get around this error so that the schema will validate, without giving up the structure/functionality that I need?
Thanks!
Comment