At 16.46 31/12/2004 +0100, Milan Tomic wrote:
Hi,

        In this case, the best way for me is not extract <Signature>
node and then validate it only. Which is the best way to do it? I have
DOMElement* pointer to the Signature node.

As I wrote to another user, Xerces-C cannot validate a DOMElement*; you will have to serialize it to a string (using DOMWriter), wrap it inside a MemBufferInputSource and parse it.


Alberto


Thank you,
Milan


> -----Original Message----- > From: Alberto Massari [mailto:[EMAIL PROTECTED] > Sent: Friday, December 31, 2004 4:10 PM > To: xerces-c-dev@xml.apache.org > Subject: RE: Schema validation > > > Hi Milan, > > At 16.00 31/12/2004 +0100, Milan Tomic wrote: > >Hi Albero, > > > > I've tried that and got the error as it is in the > attachment. > > you are validating the XML file against the schema for the digital > signatures, but your file also contains elements that are in > the empty > namespace. As you have not loaded a schema for these > elements, you will be > getting validation errors for all of them. > If you want to have zero validation errors, you need to > create (or find) > the schema for the "note" element and load it using loadGrammar. > > >[...] > > Btw, do I have to set useCachedGrammarInParse()? I'm > >validating with schema only once and never again. > > useCachedGrammarInParse() is needed, otherwise parse() will > not look at the > schema that loadGrammar() has previously loaded. > > Alberto > > > > --------------------------------------------------------------------- > 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]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to