Dave -
I haven't seen an "xsltc:output" element. There is an "xsl:output" element, but
it's not just for redirecting output. It does specify the output format,
including that of redirected output. Here's what I use.
...
xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
extension-element-prefixes="redirect"
...
<xsl:output method="xml" doctype-system="mydocuments.dtd" indent="no"/>
...
<redirect:write file="redirected-output.xml">
<xsl:apply-templates select="."/>
</redirect:write>
...
- Gene Roske
Dave Beaumont wrote:
>
> Hi,
>
> I'm fairly new to Xalan, having just moved to it from Saxon in order to use
> the translet compiler, and am trying to compile an xsl file that uses output
> file redirection. The release notes say that redirect:write is not supported
> in xsltc, but that "Output can be redirected to a file using the
> <xsltc:output> element".
>
> When I try to compile the trial script below I get the error "Unrecognised
> XSLTC extension 'xsltc:output' " which I suspect may be because I'm using a
> wrong namespace declaration. I'd be grateful if anyone can help with this.
>
> ------------------------------
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0"
> xmlns:lxslt="http://xml.apache.org/xslt"
> xmlns:xsltc="org.apache.xalan.xsltc.compiler.XSLTC"
> extension-element-prefixes="xsltc">
>
> <xsl:template match="doc">
> <xsltc:output file="redirect_test.htm">
> <xsl:value-of select="."/>
> </xsltc:output>
> </xsl:template>
>
> </xsl:stylesheet>
> ------------------------------
>
> Thanks,
> Dave Beaumont