Applying an XSD to a fragment of the document.

Discussion in 'Java' started by n4te, Apr 2, 2005.

  1. n4te

    n4te Guest

    I am using a SAX parser (javax.xml.parsers.SAXParser) to parse a
    document. I have an element that contains an any node...

    <xs:element name="extension" minOccurs="0" maxOccurs="unbounded">
    <xs:complexType>
    <xs:sequence>
    <xs:any minOccurs="0" maxOccurs="unbounded"
    processContents="lax"/>
    </xs:sequence>
    <xs:attribute name="uid" type="xs:string"/>
    </xs:complexType>
    </xs:element>

    Using this element's "uid" attribute I can lookup an XSD that I need to
    apply to all elements within this element. Is there a way I can do this
    programmatically, without requiring the XML document author to put in
    the xmlns and SchemaLocation?

    Here is a link to the source for my parser:

    http://tinyurl.com/5gfsf

    Thanks!
     
    n4te, Apr 2, 2005
    #1
    1. Advertising

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. Rick Razzano

    XSD document for XSD defintion

    Rick Razzano, Sep 26, 2003, in forum: XML
    Replies:
    1
    Views:
    530
    C. M. Sperberg-McQueen
    Sep 26, 2003
  2. Lewis G. Pringle, Jr.
    Replies:
    0
    Views:
    628
    Lewis G. Pringle, Jr.
    Sep 30, 2003
  3. n4te
    Replies:
    0
    Views:
    380
  4. Replies:
    0
    Views:
    581
  5. Netx
    Replies:
    12
    Views:
    757
    dorayme
    Dec 1, 2008
Loading...

Share This Page