Hi, DOMImplementationRegistry registry = DOMImplementationRegistry.newInstance(); DOMImplementationLS domImpl = (DOMImplementationLS) registry.getDOMImplementation("LS 3.0"); LSParser parser = domImpl .createLSParser(DOMImplementationLS.MODE_SYNCHRONOUS, XMLConstants.W3C_XML_SCHEMA_NS_URI); org.w3c.dom.DOMConfiguration config = parser.getDomConfig(); config.setParameter("resource-resolver", resolver); //where resolver is an LSResolver Document doc = parser.parseURI(sourceURI); Afterwards I am using the DOM Validation api to validate the DOM when it is modified. The LSResolver has the resolveResoure method: public LSInput resolveResource(String type, String namespaceURI, String publicId, String systemId, String baseURI) My problem is that I need much more information about the resource than what is passed to this method. For instance I can not distinguish a DTD grammar from an XMLEntityDescription because from the "type" parameter passed. From the debugger I saw that one level higher in the stack the DOMEntityResolverWrapper has all the information I need in the XMLResourceIdentifier interface object. Is there anyway to get acces to this. By the way, at the "sax-side" of my program I do not have this issue, by using the XMLEntityResolver() with has this method: public XMLInputSource resolveEntity(XMLResourceIdentifier arg0) throws XNIException, IOException) Dick Deneer |
- How to access XMLResourceIdentifier from LSResourceRe... Dick Deneer
- Re: How to access XMLResourceIdentifier from LSR... Michael Glavassevich
- Re: How to access XMLResourceIdentifier from... Dick Deneer
- Re: How to access XMLResourceIdentifier ... Michael Glavassevich
- Re: How to access XMLResourceIdentif... Dick Deneer
