0

谁能告诉我为什么第一个 xquery 返回所需的结果,但第二个什么都不返回?在我看来,它们是相同的。

查询 1)

for $current-record-eids in collection( "EBOOK-AUTO" )
return $current-record-eids

查询 2)

let $collection as xs:string  := "EBOOK-AUTO"
for $current-record-eids in collection( "{$collection}" )  
return $current-record-eids
4

1 回答 1

2

您不需要在函数调用中使用属性值模板。只需像普通参数一样传递值:

let $collection as xs:string  := "EBOOK-AUTO"
for $current-record-eids in collection($collection)  
return $current-record-eids
于 2013-01-09T16:57:07.890 回答