Re: [xslt] Implementation of unparsed-text() (XSLT 2.0)?



Am Mittwoch, den 16.08.2006, 08:28 -0400 schrieb Daniel Veillard:
> On Wed, Aug 16, 2006 at 01:03:20PM +0200, Daniel Leidert wrote:
> > Hello,
> > 
> > I wanted to ask, if there are any plans to implement the XSLT 2.0
> > function unparsed-text() [1]. It seems the only possibility to read in
> > the content of a text-file and assign it to a variable in a XSL
> > stylesheet. So what is the current policy regarding XSLT 2.0 functions?
> > 
> > [1] http://www.w3.org/TR/xslt20/#function-unparsed-text
> 
>   Since XSLT-2.0 canibalize the same namespace, this doesn't allow for
> a graceful transition. If XSLT-2.0 functions were in a separate namespace
> adding them like any other extension would have been relatively clean,.
> but in the current situation I'm not too fond of adding partial support.
> Apparently 'http://www.w3.org/2005/xpath-functions' is available for XPath
> 2.0 function which is way cleaner, but for XSLT-2.0 functions there is
> no separation as far as I can tell, maybe I missed it though...
>   You can still use XInclude text inclusion, though it's less dynamic.

I've tried such a solution using xsltproc. See the following code:

<xsl:variable name="filecontent">
  <xi:include href="file:///etc/papersize" parse="text" encoding="iso-8859-1">
    <xi:fallback>
      <xsl:message>xinclude error: file not found</xsl:message>
    </xi:fallback>
  </xi:include>
</xsl:variable>

But it fails (with our without 'file://') and only shows the "error
message". I was wondering, if xsltproc simply ignores the xi:include
here, or if I'm doing something wrong. I read many articles and just
found the statement, that unparsed-text() will be able to do, what I
want to do.

Regards, Daniel



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]