eXist的通配符实现:
(: This script accesses the mondial database, which can be
found at http://dbis.informatik.uni-goettingen.de/Mondial/ :)
for $city in /mondial//city[name&='tre*']
return
<result>
{$city}
<country>{$city/ancestor::country/name}</country>
<province>{$city/ancestor::province/name}</province>
</result>
详细解释见:http://exist.sourceforge.net/xquery.html
Saxon应该也实现了这个功能,但是没有例子:
请见:http://www.saxonica.com/documentation/using-xquery/commandline.html
(: This script accesses the mondial database, which can be
found at http://dbis.informatik.uni-goettingen.de/Mondial/ :)
for $city in /mondial//city[name&='tre*']
return
<result>
{$city}
<country>{$city/ancestor::country/name}</country>
<province>{$city/ancestor::province/name}</province>
</result>
详细解释见:http://exist.sourceforge.net/xquery.html
Saxon应该也实现了这个功能,但是没有例子:
请见:http://www.saxonica.com/documentation/using-xquery/commandline.html