以文本方式查看主题 - 中文XML论坛 - 专业的XML技术讨论区 (http://bbs.xml.org.cn/index.asp) -- 『 XQuery/XLink/XPointer/ 』 (http://bbs.xml.org.cn/list.asp?boardid=14) ---- 请大家看一个XQuery (http://bbs.xml.org.cn/dispbbs.asp?boardid=14&rootid=&id=30432) |
-- 作者:grasssu -- 发布时间:4/12/2006 3:04:00 PM -- 请大家看一个XQuery 一个function定义如下: declare function count-nodes($sequence) { if ($sequence) then ( let $head := ( for $e1 in $sequence let $other := ( for $e2 in $sequence return ( if (not($e1 is $e2)) then $e2 else () ) ) return if ( for $e3 in $other return if ($e3 << $e1) then 1 else () ) then $e1 else () ) return let $tail := ( for $e1 in $sequence return if (not($e1 is $head)) then $e1 else () ) return (1 + count-nodes($tail)) ) else 0 } 谁能解释一下中间if ( for $e3 in $other return if ($e3 << $e1) then 1 else () ) then $e1 else () ) 这段的意思?谢谢。 |
-- 作者:yhyu -- 发布时间:5/9/2006 1:49:00 AM -- 好 |
W 3 C h i n a ( since 2003 ) 旗 下 站 点 苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》 |
9,566.406ms |