2012-10-15 62 views

回答

2

該函數是FunctX XQuery庫的一部分。有兩種方法來使用此功能:

  1. download the whole library(選擇對應於您的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) 
    
  2. 而不是下載你也可以簡單地複製粘貼,你需要爲顯示在page you linked to特定功能的所有功能全庫:

    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) 
    

在這兩個示例中,您只需將$node$seq替換爲您的變量。