I am using xalan 2.7.1 for transforming an xml document using an xsl stylesheet. I have attached the input xml as example.xml and the rule as rule.xsl.
rule.xsl uses xalan extension function xalan:nodeset() and the transformation runs fine with the interpretive xalan. However, it fails when the property avax.xml.transform. TransformerFactory is set to org.apache.xalan.xsltc.trax.TransformerFactoryImpl It actually produces a java exception with the following stack: ERROR: 'Invalid conversion from 'node-set' to 'java.lang.String'.' Exception in thread "main" javax.xml.transform.TransformerException: java.lang.RuntimeException: Invalid conversion from 'node-set' to 'java.lang.String'. at org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:639) at org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:303) at com.yahoo.sombrero.rules.SimpleTrans.main(SimpleTrans.java:58) Caused by: java.lang.RuntimeException: Invalid conversion from 'node-set' to 'java.lang.String'. at org.apache.xalan.xsltc.runtime.BasisLibrary.runTimeError(BasisLibrary.java:1609) at org.apache.xalan.xsltc.runtime.BasisLibrary.runTimeError(BasisLibrary.java:1617) at org.apache.xalan.xsltc.runtime.BasisLibrary.nodesetF(BasisLibrary.java:503) at rule.template$dot$0() at rule.applyTemplates() at rule.transform() at org.apache.xalan.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:605) at org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:632) Is this a bug in the compiled xsltc processor? Or is there a usage issue? Thanks, Sushant.
xsltc_bug.tgz
Description: GNU Zip compressed data