运行Saxon-CE示例的invokeTransform中的XPathException

时间:2014-01-24 23:16:23

标签: saxon

我试图在IBM Developerworks上运行Saxon CE示例 它引发了这个错误:

SaxonCE.XSLT20Processor 23:04:41.615 SEVERE: XPathException in invokeTransform: Either a source document or an initial template must be specified http://localhost:8984/static/SaxonceDebug/7FFD07C49946B3F4B1DE49E72F7E85FA.cache.html Line 876

我可以运行其他Saxon CE示例。这是一些API改变吗?

1 个答案:

答案 0 :(得分:1)

由于错误建议您需要提供源文档或初始模板。

类似的东西:

<script>
var onSaxonLoad = function() {
Saxon.run( {
    stylesheet:   "books.xsl",
    source:       "books.xml"
});

或     <script type="text/javascript"> var onSaxonLoad = function() { proc = Saxon.run( { stylesheet: 'scripts/stylesheet.xsl', initialTemplate: 'main' } ); }; </script>

看看:

http://www.saxonica.com/ce/user-doc/1.1/index.html#!starting/running

相关问题