I'm quite new to the concept of XQuery and this could mean I'm making a conceptual mistake...

I've got an XML file and this query:
for $params in doc('...../testObject.xml')/dataset/object[@type="myType"]/param

for $x in $params
let $y := $x/@name
where starts-with($y,"type_")
return $x/text()
and this works with saxonsa9:
java net.sf.saxon.Query ..../test.xqy
Understanding that I've to change the doc-part into "doc('{XML_DOCUMENT}')" and selecting the Type:XQuery in the Report Designer and load the testObject.xml-file.

I always get the Error Alert "Could not fetch data. Continue ? Reason: Invalid Query"

I'm using Pentaho Report Designer 1.6.0. build 348

Any input / hints will be greatly appreciated.

Thanks & best regards,