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

Discussion in 'XML' started by Petterson Mikael, May 23, 2007.

  1. 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>
    Petterson Mikael, May 23, 2007
    #1
    1. Advertising

  2. Petterson Mikael wrote:

    > 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>


    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
    Martin Honnen, May 23, 2007
    #2
    1. Advertising

  3. Martin Honnen wrote:
    > 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.)

    --
    Joe Kesselman / Beware the fury of a patient man. -- John Dryden
    Joseph Kesselman, May 23, 2007
    #3
  4. Joseph Kesselman wrote:

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


    Documented here: <http://www.exslt.org/exsl/elements/document/index.html>


    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
    Martin Honnen, May 23, 2007
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve Carrow
    Replies:
    0
    Views:
    534
    Steve Carrow
    Jul 28, 2003
  2. Steve Carrow
    Replies:
    0
    Views:
    608
    Steve Carrow
    Jul 28, 2003
  3. cvissy
    Replies:
    0
    Views:
    592
    cvissy
    Nov 16, 2004
  4. Papastefanos Serafeim

    <xsl:document> and xalan

    Papastefanos Serafeim, Jul 21, 2005, in forum: XML
    Replies:
    1
    Views:
    1,193
    Martin Honnen
    Jul 21, 2005
  5. Scott Harper
    Replies:
    0
    Views:
    391
    Scott Harper
    May 25, 2006
Loading...

Share This Page