1

使用eclipse xsl开发工具运行xsl转换时,报如下错误。但是使用撒克逊是没有问题的。如果有专家可以提供可能的解决方案,将不胜感激。

12:44:14,714 INFO  [main] Main  - javax.xml.transform.TransformerFactory=null
12:44:14,725 INFO  [main] Main  - java.endorsed.dirs=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/endorsed
12:44:14,744 INFO  [main] Main  - launchFile: /gpfs/work01/work/scratch/users/feifan_liu/.metadata/.plugins/org.eclipse.wst.xsl.jaxp.launching/launch/launch.xml
12:44:14,945 ERROR [main] JAXPSAXProcessorInvoker  - Error checking type of the expression 'funcall(tokenize, [variable-ref(rColNames/result-tree), literal-expr(\|)])'.
12:44:14,953 ERROR [main] JAXPSAXProcessorInvoker  - Could not compile stylesheet
javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:843)
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:632)
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformerHandler(TransformerFactoryImpl.java:918)
    at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.addStylesheet(JAXPSAXProcessorInvoker.java:136)
    at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.addStylesheet(JAXPSAXProcessorInvoker.java:127)
    at org.eclipse.wst.xsl.jaxp.debug.invoker.PipelineDefinition.addStyleSheet(PipelineDefinition.java:161)
    at org.eclipse.wst.xsl.jaxp.debug.invoker.PipelineDefinition.configure(PipelineDefinition.java:152)
    at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.Main.main(Main.java:72)
12:44:14,954 FATAL [main] Main  - Error with stylesheet: file:/gpfs/work01/work/scratch/users/feifan_liu/com.nuance.xslt.ahfs/files/acp2detagged.xsl
org.eclipse.wst.xsl.jaxp.debug.invoker.internal.ConfigurationException: Error with stylesheet: file:/gpfs/work01/work/scratch/users/feifan_liu/com.nuance.xslt.ahfs/files/acp2detagged.xsl
    at org.eclipse.wst.xsl.jaxp.debug.invoker.PipelineDefinition.addStyleSheet(PipelineDefinition.java:163)
    at org.eclipse.wst.xsl.jaxp.debug.invoker.PipelineDefinition.configure(PipelineDefinition.java:152)
    at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.Main.main(Main.java:72)
4

1 回答 1

3

Eclipse 似乎使用 Xalan Java,它是一个 XSLT 1.0 处理器,它只是抱怨样式表中的代码使用tokenizeXSLT/XPath 2.0 中的新功能并且 Xalan 不支持这种方式。如果您想将 XSLT 2.0 与 Java 一起使用,请尝试Saxon 9。但是,我不知道设置 Eclipse 以使用 Saxon 的详细信息。

于 2012-10-10T17:01:53.727 回答