Dinesh, I don't have enough experience with custom entity resolvers to make a recommendation on which of the two types to use. Maybe someone else with experience can offer a suggestion.
Sincerely, Steven J. Hathaway > Hi Steven, > > I am overriding resolveEntity () from class EntityResolver. It is being > called appropriately in Windows environment from function > > transform(inputXML, inputXSL, output) > > But the same function is not being called in AIX environment so the > external entities are not getting resolved. > > Do you suggest to use XMLEntityResolver instead of EntityResolver class. > > Please suggest. I need to port the same on SunOS platform as well. > > Thanks > Dinesh > > On Wed, Jan 18, 2012 at 1:01 AM, <shath...@e-z.net> wrote: > >> > Hi All, >> > >> > I am using Xalan 1.10 and Xerces 2.7. >> > >> > I am using XSLT and Entity Resolver functionality of Xerces. I >> override >> > the entityResolver function >> > >> > virtual xercesc::InputSource * resolveEntity (const XMLCh* const >> publicId >> > , >> > const XMLCh* const systemId ) >> > >> > and using XSLT as >> > >> > >> > <xsl:output method="xml" encoding="UTF-8" >> > indent="yes"cdata-section-elements >> > ="Data"/> >> > >> > <xsl:param name="additionalFile_1" >> > select="'addnl_exchange_request_mmf.xml' >> > "/> >> > >> > <xsl:variable name="additional_1" >> select="document($additionalFile_1)"/> >> > >> > >> > >> > In windows the transformation could able to resolve the document using >> > resolveEntity() >> > >> > but in AIX the resolveEntity function is not being called by >> transformer >> > hence transformation is not getting expected results. >> > >> > Do we know of any bug on AIX related to resolve Entity. >> > >> > Any help is appreciated. >> > >> > Thanks >> > >> > Dinesh >> > >> >> I have not yet tried creating custom entity resolvers. There are >> two types, both returning a pointer to an instance of class >> InputSource. The following comment is from the Xerces-C source >> code documentation. >> >> * class InputSource; >> * Revised interface for resolving entities. >> * >> * If an application needs to implement customized handling >> * for external entities, it can implement this interface and >> * register an instance with the parser using the parser's >> * setXMLEntityResolver method or it can use the basic SAX interface >> * (EntityResolver). The difference between the two interfaces is >> * the arguments to the resolveEntity() method. With the SAX >> * EntityResolve the arguments are systemId and publicId. With this >> * interface the argument is a XMLResourceIdentifier object. >> * >> * Only one EntityResolver can be set using setEntityResolver() or >> * setXMLEntityResolver, if both are set the last one set is >> * used. >> * >> * The parser will then allow the application to intercept any >> * external entities (including the external DTD subset and external >> * parameter entities, if any) before including them. >> >> Sincerely, >> Steven J. Hathaway >> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: xalan-dev-unsubscr...@xml.apache.org >> For additional commands, e-mail: xalan-dev-h...@xml.apache.org >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: xalan-dev-unsubscr...@xml.apache.org For additional commands, e-mail: xalan-dev-h...@xml.apache.org