Though serializing my own schema model into xml would allow me to reuse Xerces for validating my xml instances, I need to produce my custom DOM instance with references to my schema model objects since each xml instance Node has references to their respective NodeType's in memory. That type reference is then used to modify the xml instance in memory and dynamically validate the changes. If there was a way to associate XSModel objects with my own schema model objects at parse time I would be able to recreate the type references.
The custom XML Schema model is EMF's XSD, which AFAIK was designed by someone from the Xerces team and shares a similar design (not sure to what extent). Maybe it wouldnt be to difficult to create a wrapper? thanks for your help! On 9/24/06, Michael Glavassevich <[EMAIL PROTECTED]> wrote:
Xerces' schema validator is hardwired to use its own implementation of XSModel. You'd pretty much have to rewrite the schema validator to get it to use something else. If you want to use your own schema model you first need to convert it to the XML representation of the schema (any of stream, SAX or DOM will do) and then feed that to the schema loader [1]. As for the XNI "untyped" infoset model builder, you could just plug that in to the end of the XNI pipeline by setting it as the XMLDocumentHandler [2] on whatever XMLParserConfiguration [3] you're using. > thanks in advance. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] [1] http://xerces.apache.org/xerces2-j/faq-grammars.html [2] http://xerces.apache.org/xerces2-j/javadocs/xni/org/apache/xerces/xni/XMLDocumentHandler.html [3] http://xerces.apache.org/xerces2-j/javadocs/xni/org/apache/xerces/xni/parser/XMLParserConfiguration.html Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [EMAIL PROTECTED] E-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
