Applying an XSD to a fragment of the document.

n4te

Usenet Archive
Joined
Apr 1, 2005
Messages
1
Reaction score
0
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!
 

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

No members online now.

Forum statistics

Threads
548,049
Messages
3,104,245
Members
248,133
Latest member
DujonT

Latest Threads

Top