external parameters always string ?

Having trouble installing Oxygen? Got a bug to report? Post it all here.
PaulHermans
Posts: 82
Joined: Sat Jan 13, 2007 5:39 pm
Location: Belgium

external parameters always string ?

Post by PaulHermans »

XQuery

Code: Select all

declare variable $param external;
declare variable $param2 := doc('nvp.xml');

<ids>
{$param}{$param2}
</ids>
where parameter $param is set to doc("nvp.xml") using the Configure Parameters screen but afterwards appearing between quotes as 'doc("nvp.xml")'.

Result

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<ids>doc("nvp.xml")
<nvp>
<collection>71022A00</collection>
</nvp>
</ids>
What to do to have the $param parameter as node() not as xs:string?
Paul
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: external parameters always string ?

Post by adrian »

Hello,

Unfortunately Oxygen allows only string parameters for a transformation, so there is currently no way to set a parameter as node(). We already have this on our issue tracking tool and we plan to resolve it in a future version. I'll increase the issue's priority.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: external parameters always string ?

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 doc("nvp.xml") as value. The expression doc("nvp.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
Post Reply