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]