Page 1 of 1
XQuery xml as external variable
Posted: Mon Jan 17, 2011 7:25 pm
by sandrocchio_0.1
I have multiple XML files tha I need to pass as extermal variables
for istance
declare variable $myVar as element(*) external;
how do I declare them on the transformations scenario - parameters?
thanks
Alessandro Ilardo
Re: XQuery xml as external variable
Posted: Tue Jan 18, 2011 11:11 am
by sorin_ristache
Hello,
You set the value of a parameter (an XQuery external variable) using the
scenario parameters dialog (similar with the XSLT scenario parameters dialog). Please note that only string parameters can be set using this dialog box in the current version of Oxygen. We plan to offer a way of entering other types of values in a future version.
Regards,
Sorin
Re: XQuery xml as external variable
Posted: Mon Apr 04, 2011 2:44 pm
by sorin_ristache
Hello,
Starting with Oxygen 12.2 which will be released in April 2011 each parameter from the XSLT and XQuery transformation scenarios will have an XPath checkbox that will allow setting the type of the parameter to XPath. That means you will select the XPath checkbox for your parameter and will set for example doc("your-document-here.xml") as value. The expression doc("your-document-here.xml") will be evaluated as XPath expression and the result will be passed to your transformation. It will work for the processors that support XPath parameters: Saxon 9 and XSLTProc for XSLT, Saxon 9 for XQuery.
Regards,
Sorin
Re: XQuery xml as external variable
Posted: Wed Jun 27, 2012 6:59 pm
by sandrocchio_0.1
thanks!