Problem with <xsl:document> using xalan (jdk 1.5)

P

Petterson Mikael

Hi,

I was running the following in Netbeans 5.5:

sing com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl -
default JRE XSLT processor.
Creating
output/NcmiSigTest.java
Unsupported XSL element 'http://www.w3.org/1999/XSL/Transform:document'
Transformation finished.

Do I need an transformer that supports xslt 2.0? Or what am I missing ?

cheers,

//mikael

This is part of my xsl file:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.1">
<xsl:eek:utput method="text" />

<!-- The main template loops over all of the
classes and creates a file for each one -->

<xsl:template match="/">
<xsl:for-each select="data/class">
<xsl:variable name="filename"
select="concat('output/',@name,'.java')" />
<xsl:message>Creating
<xsl:value-of select="$filename" /></xsl:message>
<xsl:document href="{$filename}" method="text">
<xsl:call-template name="junit-class">
<xsl:with-param name="class" select="." />
</xsl:call-template>
</xsl:document>
</xsl:for-each>
</xsl:template>
 
M

Martin Honnen

Petterson said:
I was running the following in Netbeans 5.5:

sing com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl -
default JRE XSLT processor.
Creating
output/NcmiSigTest.java
Unsupported XSL element 'http://www.w3.org/1999/XSL/Transform:document'
Transformation finished.

Do I need an transformer that supports xslt 2.0? Or what am I missing ?
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.1">
<xsl:eek:utput method="text" />
<xsl:document href="{$filename}" method="text">
<xsl:call-template name="junit-class">
<xsl:with-param name="class" select="." />
</xsl:call-template>
</xsl:document>


XSLT version 1.1 never made it to W3C recommendation (a standard) so
consider to move to Saxon 8 and XSLT 2.0 which has an
xsl:result-document instruction
<http://www.saxonica.com/documentation/xsl-elements/result-document.html>
 
J

Joseph Kesselman

Martin said:
XSLT version 1.1 never made it to W3C recommendation (a standard) so
consider to move to Saxon 8 and XSLT 2.0 which has an
xsl:result-document instruction

Or a processor (such as Xalan) which supports the EXSLT redirect extension.

(EXSLT is a "standardized nonstandard" set of commonly supported
extension functions. If the thing you want to do is in EXSLT, most 1.0
processors which support it will do so via EXSLT so stylesheets using it
will be at least somewhat quasi-portable.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top