Validating XML Tag Contents but not the Tags?

Discussion in 'XML' started by Jim Whitehead, Aug 15, 2003.

  1. 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
     
    Jim Whitehead, Aug 15, 2003
    #1
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ben Jessel
    Replies:
    0
    Views:
    613
    Ben Jessel
    Aug 5, 2004
  2. Lukasz Indyk
    Replies:
    1
    Views:
    1,653
    Andrew Thompson
    Sep 22, 2004
  3. shruds
    Replies:
    1
    Views:
    1,259
    John C. Bollinger
    Jan 27, 2006
  4. windandwaves
    Replies:
    12
    Views:
    2,811
    Lachlan Hunt
    Oct 8, 2005
  5. HockeyFan
    Replies:
    2
    Views:
    503
    HockeyFan
    Dec 7, 2006
  6. johkar
    Replies:
    4
    Views:
    712
    johkar
    Mar 13, 2007
  7. André
    Replies:
    2
    Views:
    1,102
    André
    Jun 23, 2008
  8. P
    Replies:
    7
    Views:
    409
    Tad McClellan
    Jan 12, 2007
Loading...