Subject:What path notation works when in xQuery Author:Ivan Pedruzzi Date:08 Sep 2017 06:41 PM
Arthur,
Hi Arthur,
If the namespace wildcard matches your element is not in the default namespace.
To match a particular namespace you need to declare it, here an example, say you have the following XML input document which overrides the default namespace:
If the commented line of code is used in place of the following line, the result is <Outer/>. But as written, the Outer element contains a string of text from the input file.
Subject:What path notation works when in xQuery Author:Arthur Gardner Date:14 Sep 2017 06:22 PM Originally Posted: 14 Sep 2017 06:21 PM
Hi.
I am using DataDirect. If I choose Saxon, the xQuery runs forever, until I kill it with Task Manager. I'm developing on Windows 7 (64) and deploying to Linux.
declare variable $xPRSXMLInput as document-node(element(*, xs:untyped)) external;
let $doc := $xPRSXMLInput/distribution-request/distribution-package/distribution-item/calligo-item/generation-data/plain-data/interactive/bogus
let $options:= $doc/ml:ManualUnderwriting/ml:Quote/ml:INST_Options
return
<Outer>
{
for $opt in $options/ml:Option
return
let $covs := $opt/ml:Coverage
let $cov := $covs[3]
let $pc := $cov/ml:INST_CovType/text()
return $pc
}
</Outer>