Commented: (XERCESJ-1204) Can not set XMLEntityResolver for LSParser 2006-11-16 - By Dick Deneer (JIRA)
[ http://issues.apache.org/jira/browse/XERCESJ-1204?page=comments#action _12450458 ] Dick Deneer commented on XERCESJ-1204: --------------------------------------
On 20/Oct/06 I commented: ================================================ Strange enough it is called when you first do a revalidation with : - you have set config.setParameter("schema-type", "http://www.w3.org/2001/XMLSchema"); and then switch back to - config.setParameter("schema-type", "http://www.w3.org/TR/REC-xml"); =================================================
This comment can be ignored; it was caused by my program where I reread the xml into a Dom. The Dom revalidation itself will never call getExternalSubset. But personally this is not a problem for me. You van use the set schema-location, and then the resolveEntity method will be called, with in the systemId the given location.
> Can not set XMLEntityResolver for LSParser > ------------------------------------------ > > Key: XERCESJ-1204 > URL: http://issues.apache.org/jira/browse/XERCESJ-1204 > Project: Xerces2-J > Issue Type: Bug > Components: DOM (Level 3 Core) > Affects Versions: 2.8.1 > Reporter: Dick Deneer > Assigned To: Michael Glavassevich > Priority: Minor > Attachments: DOMConfigurationImpl.java, DOMConfigurationImpl.java, DOMParserImpl.java, DOMParserImpl.java, XMLParser.java > > > Using the DOM level 3 api to create a DOM using : > 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); > 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. > I want to use the XMLEntityResolver but trying: > config.setParameter( > "http://apache.org/xml/properties/internal/entity-resolver", myXMLEntityResolver) > gives an org.w3c.dom.DOMException: FEATURE_NOT_FOUND: The parameter http:/ /apache.org/xml/properties/internal/entity-resolver is not recognized.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http:/ /issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe, e-mail: j-dev-unsubscribe@(protected) For additional commands, e-mail: j-dev-help@(protected)
|
|