以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 XQuery/XLink/XPointer/ 』  (http://bbs.xml.org.cn/list.asp?boardid=14)
----  怎么能区别名字一样的node ?  (http://bbs.xml.org.cn/dispbbs.asp?boardid=14&rootid=&id=30521)


--  作者:grasssu
--  发布时间:4/13/2006 6:18:00 PM

--  怎么能区别名字一样的node ?
E.g. 给出一个 node 序列 $seq <a,b,d,c,a>, 下面的query 得到的是{b,d,c} 还是{b,d,c,a}? 如果是前者,有没有办法得到后者呢?注意不能用count,sum, at, to这几个谓词还有constructors。

for $e1 in $sequence
    let $other :=
    (
        for $e2 in $sequence
        return
        (
            if (not($e1 is $e2)) then $e2 else ()
        )
    )


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
8,456.055ms