Hello,
I think the XML input document is the default context of an unprefixed
XPath expression, that is an expression with no $doc/ prefix and with no
doc('someDocument.xml')/ prefix. You can just omit the . character as
the first step of an XPath expression applied to the input XML document
without changing the meaning of the expression. It does not seem to
represent a special case of XQuery usage or Saxon usage to warrant
special treatment in a user manual. Am I missing something?
Regards,
Sorin
Eliot Kimber wrote:
I wanted to apply an XQuery to the input document specified in a Saxon
transformation scenario but it wasn't immediately obvious how this would
work.
I figured out that this works:
let $doc := .
As the first statement in the query (or the first that doesn't reset the
context value).
I think this works because Saxon uses the value of the -s parameter as
the value of the query's context node (which is accessed using ".").
It would be useful to have an example of this in the online help for
running XQueries using Saxon.
Cheers,
E.
_______________________________________________
oXygen-user mailing list
[email protected]
http://www.oxygenxml.com/mailman/listinfo/oxygen-user