Re: [xslt] xsltproc xalan:write problem





On 28 February 2018 at 02:08, Nicolas Grégoire <nicolas gregoire agarri fr> wrote:

> 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="" method="text">
        <xsl:text>Just a PoC</xsl:text>
    </redir:write>
  </xsl:template>
  
</xsl:stylesheet
8<--------------------------------------------------------------------

Nicolas,

Great that does the job nicely with the trailing '>' added :)

Thanks a lot,

Aaron

--
Aaron Gray

Independent Open Source Software Engineer, Computer Language Researcher, Information Theorist, and amateur computer scientist.


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