XQuery xml as external variable

Questions about XML that are not covered by the other forums should go here.
sandrocchio_0.1
Posts: 14
Joined: Tue Nov 23, 2010 4:04 pm

XQuery xml as external variable

Post 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
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: XQuery xml as external variable

Post 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
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: XQuery xml as external variable

Post 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
sandrocchio_0.1
Posts: 14
Joined: Tue Nov 23, 2010 4:04 pm

Re: XQuery xml as external variable

Post by sandrocchio_0.1 »

thanks!
Post Reply