Applying an XSD to a fragment of the document.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • n4te

    Applying an XSD to a fragment of the document.

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

    <xs:element name="extension " minOccurs="0" maxOccurs="unbo unded">
    <xs:complexType >
    <xs:sequence>
    <xs:any minOccurs="0" maxOccurs="unbo unded"
    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
    programmaticall y, without requiring the XML document author to put in
    the xmlns and SchemaLocation?

    Here is a link to the source for my parser:

    Download The Platonos Project for free. Platonos is a group of sub projects that will provide a highly dynamic and rapid application development cycle for java developers. The core project is the dynamic plugin engine, with a Swing application framework built on top of it.


    Thanks!

Working...