Hi,
I have a document with a bunch of elements under a single root element which has a few elements I care about, and want to validate; but those elements may occur anywhere in the document.
There are also other elements that I don't want to validate; I don't care if they're there or what's in 'em.
I tried the obvious thing, an XSD with the elements I care about in an 'all' element, and following that an 'any' element, but this isn't allowed.
I've considered:
- including the other elements in my schema - yuk.
- transforming the document to get rid of the other elements - woah, overkill.
There must be a way to do this, right?
If we need an example:
<book>
<title/>
<author/>
<editor/>
<pubdate/>
</book>
For the example, I would want to check that title and editor are present, and ignore author and pubdate. Note, the sequence of elements my not be the same.