The XQuery is stored in a file "DDR_Text.lines_ListFileTOs.xquery"
It seems to be expecting the XQuery to be XML instead of a simple xquery string, and parsing it.
How can I get the XQuery debugger to behave the same as the XQuery builder?
Thanks for help through these teething troubles!
Code: Select all
(: 0. Output text instead of XML :) declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization"; declare option output:method "text"; for $File in (: 1. Drill down to each document of the DDR or use current doc :) (/FMPReport/File/@link/doc(.) union doc('')[/FMPReport/@link]) (: 2. Drill down further to the required Catalog :) /FMPReport/File let $filename := replace($File/@name,"^(.+?)(\.\w+)?$","$1") return ( for $tablename in $File/RelationshipGraph/TableList (: 3. Find all table occurences :) /Table/@name ! concat($filename , '::' , data(.)) order by $tablename return $tablename (: 4. Prepend the file name onto each of them :) ) (: 5. Output the results as a list sep
=> fn:string-join(' ')