使用 BaseX 程序,我能够使用 XPath 和 XQuery 来查询位于我的主目录中的 XML 文档,但是在 XSLT 中执行相同操作时遇到了问题。
我要查询的文档是BookstoreQ.xml。
XPath 版本,运行良好:
doc("/home/ioannis/Desktop/BookstoreQ.xml")/Bookstore/Book/Title
我要执行的 XSLT 代码:
<xsl:stylesheet version = "2.0" xmlns:xsl = "http://www.w3.org/1999/XSL/Transform">
<xsl:output method= "xml" indent = "yes" omit-xml-declaration = "yes" />
<xsl:template match = "Book"></xsl:template>
</xsl:stylesheet>
我在 XSLT 上阅读了BaseX 的文档,但没有找到解决方案。如何运行给定的 XSLT?