XSLT Error: java.lang.ExceptionInInitializerError

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Matt

    XSLT Error: java.lang.ExceptionInInitializerError

    I run the xalan-java v2.60 command line:
    java org.apache.xala n.xslt.Process -in test.xml -xsl test.xsl -out test.html

    But it has the following error:
    (Location of error unknown)XSLT Error (java.lang.Exce ptionInInitiali zerError): null

    test.html is created, but it is a blank file. Any ideas??

    //------------- test.xml ---------------------
    <source>
    <title>XSL</title>
    <author>John Smith</author>
    </source>

    //------------- test.xsl ---------------------
    <xsl:styleshe et version = '1.0'
    xmlns:xsl='http ://www.w3.org/1999/XSL/Transform'>
    <xsl:template match="/">
    <h1>
    <xsl:value-of select="//title"/>
    </h1>
    <h2>
    <xsl:value-of select="//author"/>
    </h2>
    </xsl:template>
    </xsl:stylesheet>
  • Martin Honnen

    #2
    Re: XSLT Error: java.lang.Excep tionInInitializ erError



    Matt wrote:
    [color=blue]
    > I run the xalan-java v2.60 command line:
    > java org.apache.xala n.xslt.Process -in test.xml -xsl test.xsl -out test.html
    >
    > But it has the following error:
    > (Location of error unknown)XSLT Error (java.lang.Exce ptionInInitiali zerError): null
    >
    > test.html is created, but it is a blank file. Any ideas??
    >
    > //------------- test.xml ---------------------
    > <source>
    > <title>XSL</title>
    > <author>John Smith</author>
    > </source>
    >
    > //------------- test.xsl ---------------------
    > <xsl:styleshe et version = '1.0'
    > xmlns:xsl='http ://www.w3.org/1999/XSL/Transform'>
    > <xsl:template match="/">[/color]

    You might want to try to properly wrap your result elements into a root
    element e.g.
    <html>
    <body>[color=blue]
    > <h1>
    > <xsl:value-of select="//title"/>
    > </h1>
    > <h2>
    > <xsl:value-of select="//author"/>
    > </h2>[/color]
    </body>
    </html>[color=blue]
    > </xsl:template>
    > </xsl:stylesheet>[/color]

    --

    Martin Honnen


    Comment

    Working...