I have been trying to compile xslt file into java class and keep getting this errors. Not sure what I am doing wrong here:
java com.sun.org.apache.xalan.internal.xsltc.cmdline.Compile test.xslt
java.lang.NullPointerException
at com.sun.org.apache.xalan.internal.xsltc.compiler.Parser.parse(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compile(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compile(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compile(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.cmdline.Compile.main(Unknown Source)
Compiler errors:
Could not compile stylesheet
my test.xslt file:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/hello-world">
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<H1>
<xsl:value-of select="greeting"/>
</H1>
<xsl:apply-templates select="greeter"/>
</BODY>
</HTML> </xsl:template> <xsl:template match="greeter">
<DIV>from <I><xsl:value-of select="."/></I></DIV>
</xsl:template>
</xsl:stylesheet>
>) part of your .xslt file?