How to use Saxon XPath processor w/o coding in Java

后端 未结 3 1063
时光说笑
时光说笑 2021-01-14 08:52

I guess I could make some XSL stylesheet, then use it as a template with parameter option to evaluate XPath expression with Saxon XSLT processor on command line, like:

3条回答
  •  天涯浪人
    2021-01-14 09:29

    As @DanielHaley says, using XQuery from the command line is a better bet. Providing XPath from the command line wouldn't be very useful because XPath offers no way to control the formatting of the output. XPath is a subset of XQuery, so you can use the XQuery interface to evaluate XPath expressions if you choose.

    Note that the current version of open-source Saxon is Saxon-HE 9.4.0.2. You can find out which version you are using with the -t option on the command line. It sounds as if you might have found an old version (Saxon-B) bundled with your Linux distribution, and @prunge has pointed you to an even older version (Saxon 6.5) which only supports XSLT 1.0 and XPath 1.0.

    UPDATE: As of January 2019, the current version of Saxon is 9.9.0.2

提交回复
热议问题