【问题标题】:Saxon CE and XQuery? Documentation indicates no XQuery, Examples otherwise?撒克逊 CE 和 XQuery?文档表明没有 XQuery,否则有示例?
【发布时间】:2013-05-20 16:16:36
【问题描述】:

Saxon CE 是流行 XSLT 的 javascript 实现,其文档表明 Saxon-CE 已删除 XQuery 支持。

但是,Saxon-CE 中的 example documentation 在我看来是几个“选择”中的 XQuery。

具体...

<!-- Set up the empty board -->
<xsl:variable name="empty-board" as="xs:integer*" select="for $i in (1 to 64) return 0"/>

还有……

<!-- integer in range 0..63 -->
<xsl:sequence select="for $i in 1 to 64 return if ($i = $square + 1) then $move else $board[$i]"/>

作为 XSLT/Xpath/XQuery 的初学者,尤其是最近的 Saxon-CE,我很困惑。以上在我看来像 XQuery,但文档表明 Saxon-CE 不支持 XQuery。

以上真的是 XQuery 吗? Saxon-CE 是否真的支持 XQuery? 以上完全是另外一回事吗?

【问题讨论】:

    标签: xslt xpath xquery saxon


    【解决方案1】:

    XSLT 2.0XQuery 1.0 使用 XPath 2.0,这就是您所识别的 XQuery 在上面的代码中。

    • 上面的代码是XSLT 2.0,不是XQuery。
    • Saxon-CE 不支持 XQuery,但通过支持 XSLT 2.0,它固有地支持 XPath 2.0

    【讨论】:

    • 这更有意义!现在我知道我在看什么,我在 XPath 2.0 规范中找到了描述 for 表达式的部分。谢谢!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-11-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-01-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多