以文本方式查看主题

-  课外天地 李树青  (http://njcie.com/bbs/index.asp)
--  信息检索原理课件  (http://njcie.com/bbs/list.asp?boardid=16)
----  课上所讲基于eXist的XQuery练习  (http://njcie.com/bbs/dispbbs.asp?boardid=16&id=746)

--  作者:admin
--  发布时间:2009/5/27 22:45:33
--  课上所讲基于eXist的XQuery练习

1、查询含有London的国家信息(选择)
for $p in //country
where contains($p,"London")
return $p


 

2、查询含有Caesar的莎士比亚戏剧对话
for $speech in //SPEECH[LINE &= \'Caesar\' ]
return $speech


 

3、查询Hamlet对白中含有faith的语句
for $speech in //SPEECH[SPEAKER &= \'HAMLET\' and near(., \'faith\')]
return $speech


 

4、查询含有exam的学生信息
for $p in //stu
where contains($p,"exam")
return $p


 

5、使用URL请求eXist
http://localhost:8080/exist/servlet/db/?_query=for $p in //stu where contains($p,"exam") return $p

[此贴子已经被作者于2010-12-14 09:41:42编辑过]