Michael,

I first tried the xerces way by using the XMLGrammarPreparser and a DOMIputsource.
But how can I get the domNode that causes the error.
XMLGrammarPreparser.getProperty (XMLGrammarDescription.XML_SCHEMA,"http://apache.org/xml/properties/ dom/current-element-node") is not accepted. And afterwards there are no nodes where the getValidity gives a status invalid. Also I do not find any typeinformation after the parsing.

In fact the same issues are for the jaxp SchemaFactory.
- http://apache.org/xml/properties/dom/current-element-node is not accepted on the factory
- there is no post validation schema information present.

Can you please give some more hints.




Op 19-dec-2006, om 0:05 heeft Michael Glavassevich het volgende geschreven:

Dick Deneer <[EMAIL PROTECTED]> wrote on 12/18/2006
04:45:53 PM:

I am using the DOMNormalizer to validatie instance document against
DTD or  XSD.
I noticed that this even works when the instance document itself is
an xsd. You can give  http://www.w3.org/2001/XMLSchema.xsd  as the
schemaLocation and the document will be validated without problems.
PSVI information will be added to the DOM. So far the behaviour
great and exactly what I need (DOMError locations, psvi).

But the checking that is done to the schema is not as strict as done
by a real GrammarParser.
But to the grammarparser I can not pass a DOM. Is there a solution
for my problem. ?

Yes. XMLGrammarPreparser [1] will accept a DOMInputSource [2] as input. If
you're using JAXP's SchemaFactory you would pass it a
javax.xml.transform.dom.DOMSource.

Regards
Dick Deneer

[1]
http://xerces.apache.org/xerces2-j/javadocs/xerces2/org/apache/ xerces/parsers/XMLGrammarPreparser.html
[2]
http://xerces.apache.org/xerces2-j/javadocs/xerces2/org/apache/ xerces/util/DOMInputSource.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]




Reply via email to