Hi Uwe,

Have you looked at the JAXP Validation API [1]? You can start validation
from any Element node in the DOM with this API. If you need to force a
specific element declaration to be used, for example a local one defined
within a complex type, you're out of luck with Xerces-J 2.9.1. However, I
recently implemented a property [2] which allows you to do that. If you're
up for using the current development stream, you can get it from SVN [3].

Thanks.

[1] http://xerces.apache.org/xerces2-j/faq-pcfp.html#faq-4
[2] http://issues.apache.org/jira/browse/XERCESJ-1338
[3] http://xerces.apache.org/xerces2-j/source-repository.html

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrgla...@ca.ibm.com
E-mail: mrgla...@apache.org

q3s38w...@sneakemail.com wrote on 01/21/2009 10:06:46 PM:

> Hi all,
>
> I'm wondering if it is possible to validate a singe XML element in a
> larger DOM document.
>
> Using Xerces-J 2.9.1, my program can successfully parse and validate
> an XML document into a DOM using it's accompanying schema (of which
> I also managed to load it's XSModel). However, I'd like to be able
> to revalidate parts of the document after the user changed an
> element's attributes.
>
> Is that at all possible, or am I forced to re-validate the whole DOM?
>
> How would I go about to do this?
>
> Cheers,
>
> Uwe

Reply via email to