Re: [xslt] xsltproc xalan:write problem




I am trying to get xalan:write to work with libxslt's xsltproc. I
have looked at the source code and found code pertaining to its
implemetation but cannot get it to work from input.

You simply have an incorrect namespace.

xmlns:xalan="http://xml.apache.org/xalan/redirect";

That should be "org.apache.xalan.xslt.extensions.Redirect" (tested with
libxslt 10128 + libexslt 817):

8<--------------------------------------------------------------------
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                xmlns:redir="org.apache.xalan.xslt.extensions.Redirect"
                extension-element-prefixes="redir"
                version='1.0'>

  <xsl:template match="/">
    <redir:write href="/tmp/by_libxslt" method="text">
        <xsl:text>Just a PoC</xsl:text>
    </redir:write>
  </xsl:template>
  
</xsl:stylesheet
8<--------------------------------------------------------------------

Nicolas


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