I have broken my schema into parts to make it more manageable, each part is inside a separate file, and I am using element ref <xs:include schemaLocation="HDR.xsd" /> <xs:include schemaLocation="OPT.xsd" />
<xs:element name="TOP">
<xs:complexType>
<xs:sequence>
<!-- always present -->
<xs:element ref="HDR" minOccurs="1" maxOccurs="1" dfdl:terminator="%NL;"/>
<!-- optional is present only if (HDR.check != 0) -->
<xs:element ref="OPT" minOccurs="0" maxOccurs="1" dfdl:terminator="%NL;" />
... </xs:sequence> <xs:assert test="HDR/check[eq.0]" /> when I try to run it parser complains: "Invalid content was found starting with element 'xs:assert'. No child element is expected at this point". How to fix it for element ref, use key/keyref? Thanks, Victor