Help Please,

I'm having a few problems in attempting to format an xml data file in conjunction with a xslt stylesheet in that I can't seem to resolve the exception:-

[error] XSL-1900: (Fatal Error) An internal error condition occurred.
[error] javax.xml.transform.TransformerException: XSL-1900: (Fatal Error) An internal error condition occurred.
when my program encounters the statement "trans.transform(xmlSource, result);"
The only lead in can find towards the XSL-1900 error is in and old oracle/otn/fourum message but the reference leads nowhere.

Any pointers to the cause of this problem would be very much appreciated.

Many Thanks.

To help isolate the problem I’ve used a simple example (below) I extracted from O'Reilly's technical books, the source xml and the xslt stylesheet I use are also from the same source so I'm happy that all the required files are correct.

I'm using jdk_1.42 and working from within the Jbuilderx development ide, I also have Oracle 9.2As installed on the same machine but am not using any of the Oracle libraries for this project.

-----------------------------------------------------------------
public class SimpleJaxp {
/**
* Accept two command line arguments: the name of an XML file, and
* the name of an XSLT stylesheet. The result of the transformation
* is written to stdout.
*/
public static void main(String[] args)
throws javax.xml.transform.TransformerException {
if (args.length != 2) {
System.err.println("Usage:");
System.err.println(" java " + SimpleJaxp.class.getName( )
+ " xmlFileName xsltFileName");
System.exit(1);
}
File xmlFile = new File(args[0]);
File xsltFile = new File(args[1]);

javax.xml.transform.Source xmlSource =
new javax.xml.transform.stream.StreamSource(xmlFile);
javax.xml.transform.Source xsltSource =
new javax.xml.transform.stream.StreamSource(xsltFile);
javax.xml.transform.Result result =
new javax.xml.transform.stream.StreamResult(System.out);

// create an instance of TransformerFactory
javax.xml.transform.TransformerFactory transFact =
javax.xml.transform.TransformerFactory.newInstance( );

javax.xml.transform.Transformer trans =
transFact.newTransformer(xsltSource);

// exception occurs on this statement.
trans.transform(xmlSource, result);
[error] XSL-1900: (Fatal Error) An internal error condition occurred.
[error] javax.xml.transform.TransformerException: XSL-1900: (Fatal Error) An internal error condition occurred.
}
}

xml source file.
----------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<message>Yep, it worked!</message>

Stylesheet
----------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" encoding="UTF-8"/>
<!-- simply copy the message to the result tree -->
<xsl:template match="/">
<xsl:value-of select="message"/>
</xsl:template>
</xsl:stylesheet>