Validating XML Tag Contents but not the Tags?

J

Jim Whitehead

Hello,

We would like to use several tags that are ignored for validation purposes,
but whose content is not ignored.

That is, given an XML schema containing something like this:

<--! These tags would be allowed anywhere in the document, but ignored for
validation purposes -->
<xs:element name="ADD"/>
<xs:element name="DEL"/>
<xs:element name="OTH"/>

<xs:element name="Reference">
<xs:complexType mixed="true">
<xs:sequence>
<xs:element name="XXX"/>
<xs:element name="YYY"/>
<xs:element name="ZZZ"/>
</xs:sequence>
</xs:complexType>
</xs:element>

We would like something like this to be a valid document:

<Reference xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="test.xsd">
<XXX/>
<DEL><OTH><YYY/></OTH></DEL>
<ADD><ZZZ/></ADD>
</Reference>

Is there a way to do this?

Thank you very much for any insight you can provide!

Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,084
Latest member
HansGeorgi

Latest Threads

Top