XQueryEvaluator result to om.Sequence

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

XQueryEvaluator result to om.Sequence

Florent Georges-3
Hi,

I have a s9api's XQueryEvaluator object, and need to retrieve a Sequence
(the interface in net.sf.saxon.om) out of it, to reoresent its result
after calling run() on it.

In case this is relevant, the result can be hold in memory.

Regards,

--



------------------------------------------------------------------------------

_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: XQueryEvaluator result to om.Sequence

andrew1.welch
Hi Florent,

Doesn't evaluate().getUnderlyingValue() return the Sequence you are after?

Andrew1 WELCH
XML Developer | Finance & Regulatory IT | HSBC BANK PLC HBEU
8 Canada Square,Canary Wharf,London,E14 5HQ,United Kingdom
__________________________________________________________

Phone 0207 991 9571
Mobile 07717 684 177
Email andrew1.welch@...


__________________________________________________________
Protect our environment - please only print this if you have to!





From:        Florent Georges <[hidden email]>
To:        Mailing list for the SAXON XSLT and XQuery processor <[hidden email]>
Date:        12/09/2016 06:47
Subject:        [saxon] XQueryEvaluator result to om.Sequence




Hi,

I have a s9api's XQueryEvaluator object, and need to retrieve a Sequence
(the interface in net.sf.saxon.om) out of it, to reoresent its result
after calling run() on it.

In case this is relevant, the result can be hold in memory.

Regards,

--
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/


***************************************************
This message originated from the Internet. Its originator
may or may not be who they claim to be and the information
contained in the message and any attachments may or may
not be accurate.
****************************************************
------------------------------------------------------------------------------


***************************************************
This message originated from the Internet. Its originator
may or may not be who they claim to be and the information
contained in the message and any attachments may or may
not be accurate.
****************************************************
_______________________________________________
saxon-help mailing list archived at
http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help



************************************************************
HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as well as internal systems, controls and procedures to identify and manage conflicts of interest.

HSBC Bank plc
Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom
Registered in England - Number 14259
Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority
************************************************************


-----------------------------------------
SAVE PAPER - THINK BEFORE YOU PRINT!

This E-mail is confidential. 

It may also be legally privileged. If you are not the addressee you may not copy,
forward, disclose or use any part of it. If you have received this message in error,
please delete it and all copies from your system and notify the sender immediately by
return E-mail.

Internet communications cannot be guaranteed to be timely secure, error or virus-free.
The sender does not accept liability for any errors or omissions.


------------------------------------------------------------------------------

_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: XQueryEvaluator result to om.Sequence

Michael Kay
In reply to this post by Florent Georges-3
XQueryEvaluator.evaluate() gives you an XdmValue, and XdmValue.getUnderlyingValue() gives you a Sequence.

Using the run() method and a Destination object is more appropriate when you want the results to be assembled into a tree, e.g. a sequence of numbers being turned into a single text node with whitespace separation.

Michael Kay
Saxonica


On 12 Sep 2016, at 06:45, Florent Georges <[hidden email]> wrote:

Hi,

I have a s9api's XQueryEvaluator object, and need to retrieve a Sequence
(the interface in net.sf.saxon.om) out of it, to reoresent its result
after calling run() on it.

In case this is relevant, the result can be hold in memory.

Regards,

--


------------------------------------------------------------------------------
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help


------------------------------------------------------------------------------

_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: XQueryEvaluator result to om.Sequence

Florent Georges-3
Hi,

Yes, of course I was missing evaluate().  Using it as well as getUnderlyingValue() on its result solves my problem (which was sitting somewhere between my chair and my keyboard).

Thank you, Mike and Andrew!

-- 


On 12 September 2016 at 09:52, Michael Kay wrote:
XQueryEvaluator.evaluate() gives you an XdmValue, and XdmValue.getUnderlyingValue() gives you a Sequence.

Using the run() method and a Destination object is more appropriate when you want the results to be assembled into a tree, e.g. a sequence of numbers being turned into a single text node with whitespace separation.

Michael Kay
Saxonica


On 12 Sep 2016, at 06:45, Florent Georges <[hidden email]> wrote:

Hi,

I have a s9api's XQueryEvaluator object, and need to retrieve a Sequence
(the interface in net.sf.saxon.om) out of it, to reoresent its result
after calling run() on it.

In case this is relevant, the result can be hold in memory.

Regards,


--


------------------------------------------------------------------------------
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help


------------------------------------------------------------------------------

_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help





------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Loading...