【问题标题】:How to build ancestor tree without using ancestor-or-self::*如何在不使用祖先或自我的情况下构建祖先树::*
【发布时间】:2018-02-19 22:59:22
【问题描述】:

我需要获取多个值的路径,但是我正在使用的 Xquery 环境不支持这种语法 for $ancestor in $datum/ancestor-or-self::* 特别是这个轴导致问题ancestor-or-self::*。似乎无法弄清楚这一点。任何帮助表示赞赏

【问题讨论】:

    标签: xml xslt xpath xquery


    【解决方案1】:

    在没有ancestor* 轴的情况下,您可以递归地爬上parent 轴,或者使用root() 函数检索文档节点,然后沿着childdescendant 轴下降。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-11-25
      • 2011-11-16
      相关资源
      最近更新 更多