You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Robert Zimmermann <rz...@webde-ag.de> on 2003/12/16 16:58:37 UTC

entity resolution in XSLT escpecially in XALAN-C

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:rz@webde-ag.de

Re: entity resolution in XSLT escpecially in XALAN-C

Posted by da...@us.ibm.com.



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:      xalan-dev@xml.apache.org                                                       
                      <rz...@webde-ag.de>         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:rz@webde-ag.de