eXist Xquery Examples[1]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

eXist Xquery Examples

  Copyright@ ♂猜猜♂. 2005. All rights reserved

以下ex:>代表输入表达式 re:>表示输出结果

--插入[使用existxquery数据库检索工具]说明--

 

[基础操作]

 

1 条件表达式

       ex:>if (3 < 4) then "yes!" else "no!"

       re:>yes!

      

       ex:>

              for $x in (-1.5, 0.4, 1.7)

              return <amount>

                     {

                            if ($x < 0)

                                   then concat("(", -$x, ")")

                            else $x

                     } </amount>

       re:>

              <amount>(1.5)</amount>

              <amount>0.4</amount>

              <amount>1.7</amount>

       说明:注意第一行的输出和其它两行有所不同

                            -$x$x取反

      

2 定义本地变量

本文关键:eXist Xquery Examples
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top