Re: [oXygen-user] document nodes as external parameters

Lee, David wrote: Hi,
Is there any way to pass document nodes directly (not by name) to XQuery within Oxygen ?
oXygen uses (AFAIK) XCC in order to connect to MarkLogic. And XCC supports only (AFAIK) strings for query parameters (a.k.a. external variables). The usual trick is either: 1/ to pass a string with the lexical representation of the document and use xdmp:unquote(), or 2/ to pass the URI of the document to open and use doc(). Regards, -- Florent Georges http://fgeorges.org/

Hello, Only string values can be passed as parameter in the current version. We have on our to-do list an improvement to allow also other types of values. Please follow Florent's suggestion. Regards, Sorin Florent Georges wrote:
Lee, David wrote:
Hi,
Is there any way to pass document nodes directly (not by name) to XQuery within Oxygen ?
oXygen uses (AFAIK) XCC in order to connect to MarkLogic. And XCC supports only (AFAIK) strings for query parameters (a.k.a. external variables).
The usual trick is either: 1/ to pass a string with the lexical representation of the document and use xdmp:unquote(), or 2/ to pass the URI of the document to open and use doc().
Regards,

This has nothing to do with MarkLogic ... I'm running standalone xquery (saxon). Please add my vote to support values besides xs:string for parameters. I use XQuery (saxon) embedded in Java programs and frequently need to pass XdmValue's directly not as strings. I guess this may be one reason I still use StylusStudio for most of my debugging work ... ---------------------------------------- David A. Lee Senior Principal Software Engineer Epocrates, Inc. dlee@epocrates.com 812-482-5224 -----Original Message----- From: oxygen-user-bounces@oxygenxml.com [mailto:oxygen-user-bounces@oxygenxml.com] On Behalf Of Sorin Ristache Sent: Wednesday, January 19, 2011 9:44 AM To: oxygen-user@oxygenxml.com Subject: Re: [oXygen-user] document nodes as external parameters Hello, Only string values can be passed as parameter in the current version. We have on our to-do list an improvement to allow also other types of values. Please follow Florent's suggestion. Regards, Sorin Florent Georges wrote:
Lee, David wrote:
Hi,
Is there any way to pass document nodes directly (not by name) to XQuery within Oxygen ?
oXygen uses (AFAIK) XCC in order to connect to MarkLogic. And XCC supports only (AFAIK) strings for query parameters (a.k.a. external variables).
The usual trick is either: 1/ to pass a string with the lexical representation of the document and use xdmp:unquote(), or 2/ to pass the URI of the document to open and use doc().
Regards,
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user

Hello, Oxygen 12.2 which will be released in April will allow setting also parameters of type XPath in the XSLT and XQuery transformation scenarios. It will work for the processors that have an API for that: Saxon 9 and XSLTProc for XSLT, Saxon 9 for XQuery. A checkbox called "XPath" will be available for each parameter and will allow you to switch between a string value and an XPath value. Regards, Sorin Lee, David wrote:
This has nothing to do with MarkLogic ... I'm running standalone xquery (saxon). Please add my vote to support values besides xs:string for parameters. I use XQuery (saxon) embedded in Java programs and frequently need to pass XdmValue's directly not as strings. I guess this may be one reason I still use StylusStudio for most of my debugging work ...
---------------------------------------- David A. Lee Senior Principal Software Engineer Epocrates, Inc. dlee@epocrates.com 812-482-5224
-----Original Message----- From: oxygen-user-bounces@oxygenxml.com [mailto:oxygen-user-bounces@oxygenxml.com] On Behalf Of Sorin Ristache Sent: Wednesday, January 19, 2011 9:44 AM To: oxygen-user@oxygenxml.com Subject: Re: [oXygen-user] document nodes as external parameters
Hello,
Only string values can be passed as parameter in the current version. We
have on our to-do list an improvement to allow also other types of values. Please follow Florent's suggestion.
Regards, Sorin
Florent Georges wrote:
Lee, David wrote:
Hi,
Is there any way to pass document nodes directly (not by name) to XQuery within Oxygen ?
oXygen uses (AFAIK) XCC in order to connect to MarkLogic. And XCC supports only (AFAIK) strings for query parameters (a.k.a. external variables).
The usual trick is either: 1/ to pass a string with the lexical representation of the document and use xdmp:unquote(), or 2/ to pass the URI of the document to open and use doc().
Regards,
participants (3)
-
Florent Georges
-
Lee, David
-
Sorin Ristache