Creating an XSD for this XML:
<items name="home">
<chicken>Foo</chicken>
<nuggets>Bar</nuggets>
<moo>Hello World</moo>
....
</item>
I don't know what elements items
will contain except that the value should be a string (no further nodes).
Is the only way to use <any processContents="skip" />
?
You can use <xsd:any processContents="skip"/>
to allow any element under items
, but you won't be able to further mandate anything about those elements' content models. (You won't be able to say that those child elements can only have text in their content models.)
You can use <xsd:any processContents="strict"/>
or <xsd:any processContents="lax"/>
and have control over only the content models of only those child elements you're able to foresee to define in your XSD.
See also
If you wish to control the content model of child elements that you've not declared explicitly, you can combine <xsd:any processContents="skip"/>
with <xsd:assert test="*[not(*)]"/>
on items
to insist that the children of items
have no element children of their own.
See also