【发布时间】:2014-03-25 12:43:53
【问题描述】:
列出某个国家所有市长的姓名
for $x in doc("Politics.xml")/Politician/CurrentMayor
where $x someCountry/name = 'Canada'
return $x/name
哪里有允许的部分?
【问题讨论】:
-
运行时会发生什么?这可能是最好的确定方法。
-
我完全同意@LegoStormtroopr。但是,仍然要回答您的问题:不,不是。
someCountry/name的上下文是什么?您可能想做$x/shomeCountry/name = 'Canada'之类的事情,尽管目前还不清楚您实际想要实现的目标。