I have a document type similar to the following:
<foo>
<settings>
<!-- Must be present; in any order -->
<time>abc</time>
<validRun>true</validRun>
<!-- Tool may add whatever ones it wants -->
<somethingNotCheckedFor>abc</somethingNotCheckedFor>
</settings>
</foo>
The following document is semantically the same as the preceding document:
<foo>
<settings>
<validRun>true</validRun>
<somethingNotCheckedFor>abc</somethingNotCheckedFor>
<time>abc</time>
</settings>
</foo>
but the following is invalid:
<foo>
<settings>
<validRun>true</validRun>
<somethingNotCheckedFor>abc</somethingNotCheckedFor>
<!-- Error: Required element "time" not present -->
</settings>
</foo>
I tried something like the following but this does not work because <xs:all>
is not allowed to contain <xs:any>
:
<xs:all>
<xs:element name="time" />
<xs:element name="validRun" />
<xs:any />
</xs:all>
Is there some means to do this in W3C Schema?