Hello! I want to group two groups of reference descriptions into one, but the following code returns empty ones:
for $d in input()/TEI.2/:text//text()
let $a := (let $ref1 := tf:createTextReference($d, "Kansas City")
for $refeach in $ref1
return <entry>{xs:int($refeach/@ino:start)}</entry>
)
let $b := (let $ref2 := tf:createTextReference($d, "New York City")
for $refeach in $ref2
return <entry>{xs:int($refeach/@ino:start)}</entry>
)
return <output>{$a}{$b}</output>
However the following test example returns perfect result:
for $d in input()/TEI.2/:text//text()
let $a := (let $ref1 := (1,2,3)
for $refeach in $ref1
return <entry>{$refeach}</entry>)
let $b := (let $ref2 := (5,5,5)
for $refeach in $ref2
return <entry>{$refeach}</entry>)
return <output>{$a}{$b}</output>
I assumed tf:createTextReferece() returns a sequence of reference descriptions and therefore I could not understand why the first Xquery does not return any results.
let $X:=Dies ist Kansas City und New York City
for $d in $X//text()
let $a := (let $ref1 := tf:createTextReference($d, “Kansas City”)
for $refeach in $ref1
return $refeach)
let $b := (let $ref2 := tf:createTextReference($d, “New York City”)
for $refeach in $ref2
return $refeach
)
return {$a}{$b}