Hello David, I read the following from Xerces-C API documentation: "The application can also use this interface to redirect system identifiers to local URIs or to look up replacements in a catalog (possibly by using the public identifier)." See: http://xml.apache.org/xerces-c/apiDocs/classEntityResolver.html
At the end of the "Detailed Description". I also read similiar things in XML Books. Do I missunderstand there something? I am using Pyana as an Python wrapper for Xalan. Returning an stream from Python causes many C++ to Python and vice versa callbacks, which slows down an entity resolution a lot. But if it would be possible just to say "use another system identifier and open the file yourself, it would be just great. Thanks for the quick answer, Robert > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 16, 2003 11:03 PM > To: [EMAIL PROTECTED] > Subject: Re: entity resolution in XSLT escpecially in XALAN-C > > > > > > > Hi Robert, > > An EntityResolver cannot return anything other than an input > stream to be > parsed. That has nothing to do with Xalan-C -- that's what > SAX defines an > EntityResolver. So I'm not sure I understand your question. Are you > saying you don't want to return a stream of XML? If not, > what do you want > to read. If so, is there some reason why your EntityResolver > cannot return > a stream that contains the XML for the included or imported > stylesheet? > > What you may be looking for is something like the JAXP > URIResolver. We > had a discussion a while back on implementing something like > this, but I > don't think we ever reached any conclusions. > > Thanks! > > Dave > > > > > > > Robert > > > Zimmermann To: > [EMAIL PROTECTED] > > <[EMAIL PROTECTED]> cc: (bcc: > David N Bertoni/Cambridge/IBM) > > Subject: > entity resolution in XSLT escpecially in XALAN-C > > 12/16/2003 04:58 > > > PM > > > Please respond > > > to xalan-dev > > > > > > > > > Hi, > > I have a general question to entity resolution in xslt: > > Is an xslt processor allowed to return an altered SystemId > instead of an input stream for e.g. on of the following > xslt elements? > > <xsl:include href="external.xslt" /> > or > <xsl:import href="external.xslt" /> > > The general answer for EntityResolvers is that they may > also return another System Identifier instead an > file-like-object created throug "makeStream" of an > InputSource. > > I looked at the API documentation of XALAN-C, especially > XSLTInputSource. > For me it seems that this class only provides an resolution > to an input stream rather than just accepting an altered > system-id and try to open this source itself. > > Why do I ask: > I want to build a small repository of xsl stylesheets to be > included in an application without for the users to worry > about the real place, where they are stored. > > > thanks a lot for Your help, > Robert > > Robert Zimmermann > Development > WEB.DE AG > mailto:[EMAIL PROTECTED] > >
