Boris, Xerces-J has had the ability to validate a DOM in-memory for years. It behaves as if you serialized and then reparsed the document with schema validation enabled except that it's much more efficient (firing SAX like events to the schema validator from a walk of the DOM tree). I think that's what Vladimir is asking for, not fail-fast setters / continuous validation which seems to be the topic in the post you referenced.
Thanks. Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [email protected] E-mail: [email protected] Boris Kolpackov <[email protected]> wrote on 07/30/2010 11:07:24 AM: > Hi Vladimir, > > Vladimir Loubenski <[email protected]> writes: > > > My understanding that single way to validate data (Validation against > > XML schema) in a DOM tree is to create the DOM document, write it back > > as XML and re-parse it with validation turned on. Are there plans to > > support validation direct from the DOM tree? > > No, there are no plans to support this at the moment. It is also > questionable how useful this feature will be since it is not clear > what one can do when a validation error has been detected. There > are some errors that will be hard/impossible to fix programmatically > (say, pattern validation error). For a more detailed discussion of > this topic, see the following post: > > http://www.codesynthesis.com/pipermail/xsd-users/2008-January/001443.html > > Boris > > -- > Boris Kolpackov, Code Synthesis http://codesynthesis.com/~boris/blog > Open-source XML data binding for C++ http://codesynthesis.com/products/xsd > XML data binding for embedded systems http://codesynthesis.com/products/xsde > Command line interface to C++ compiler http://codesynthesis.com/projects/cli > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected]
