XQuery节点是序列

XQuery节点是序列,xquery,node-set,functx,Xquery,Node Set,Functx,在XQuery中,序列中的节点是否等于?我很好奇,因为我在上看到了该函数,但我无法使用它。该函数是FunctX XQuery库的一部分。使用此功能有两种方法: 您(选择与您的XQuery版本相对应的下载),将其保存在与XQuery程序/文件相同的目录中,然后将模块导入XQuery文件中,例如: import module namespace functx = "http://www.functx.com" at "functx-1.0-doc-2007-01.xq"; (: Insert yo

在XQuery中,
序列中的节点是否等于?我很好奇,因为我在上看到了该函数,但我无法使用它。

该函数是FunctX XQuery库的一部分。使用此功能有两种方法:

  • 您(选择与您的XQuery版本相对应的下载),将其保存在与XQuery程序/文件相同的目录中,然后将模块导入XQuery文件中,例如:

    import module namespace functx = "http://www.functx.com" at "functx-1.0-doc-2007-01.xq";
    
    (: Insert your code here and call the is-node-in-sequence-deep-equal function as seen below :)
    
    functx:is-node-in-sequence-deep-equal($node, $seq)
    
  • 除了下载整个库的所有功能外,您还可以简单地复制粘贴所需的特定功能,如下图所示:

  • 在这两个示例中,您只需用变量替换
    $node
    $seq

    declare namespace functx = "http://www.functx.com"; 
    declare function functx:is-node-in-sequence-deep-equal 
      ( $node as node()? ,
        $seq as node()* )  as xs:boolean {
    
       some $nodeInSeq in $seq satisfies deep-equal($nodeInSeq,$node)
     } ;
    
    (: Insert your code here and call the 'is-node-in-sequence-deep-equal' function as seen below :)
    
    functx:is-node-in-sequence-deep-equal($node, $seq)