Return-Path: X-Original-To: apmail-synapse-dev-archive@www.apache.org Delivered-To: apmail-synapse-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 600ED10FA6 for ; Tue, 24 Sep 2013 11:14:16 +0000 (UTC) Received: (qmail 44164 invoked by uid 500); 24 Sep 2013 11:07:04 -0000 Delivered-To: apmail-synapse-dev-archive@synapse.apache.org Received: (qmail 44044 invoked by uid 500); 24 Sep 2013 11:06:46 -0000 Mailing-List: contact dev-help@synapse.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@synapse.apache.org Delivered-To: mailing list dev@synapse.apache.org Received: (qmail 43883 invoked by uid 99); 24 Sep 2013 11:06:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Sep 2013 11:06:22 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of irjanith@gmail.com designates 74.125.82.49 as permitted sender) Received: from [74.125.82.49] (HELO mail-wg0-f49.google.com) (74.125.82.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Sep 2013 11:06:15 +0000 Received: by mail-wg0-f49.google.com with SMTP id l18so4298598wgh.28 for ; Tue, 24 Sep 2013 04:05:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=e+6VF0xR9Qyfo+Pgvd9qfmySklUQH6pZU0z21/1P0F8=; b=HthvbbcWMcTb8NApNl/tfdNhDO+hSzLHBGXj17L3AC79tObSTPG8gOfD2Cz3FH6P6o eWW9FCReb4FVK/n5KVBdm53MWQAooU6Q8LmQ2tmlvW3MreM13iQHepN9xZlkqByHCPL/ Cw4mNlEZBX7V79DV0XCvhYSG3uEnMsETqS8NyCsqY5s8i5ZQbNIj659JUUZPXRE2ncQm /MOSSD2SvyZfVD+yX1BK6fv44Txr0YQdksCnwrcOXBH66lhQtjphoBwR3lh7RCWh1ql/ pROmABiT/Dd2iDl2sa9Sj4e6P6IqXuFoM1ePFCZ0qaTexPqKfZaC+mRSspJwwmtY6HjR iDtw== MIME-Version: 1.0 X-Received: by 10.194.122.99 with SMTP id lr3mr21056817wjb.21.1380020754963; Tue, 24 Sep 2013 04:05:54 -0700 (PDT) Received: by 10.216.122.74 with HTTP; Tue, 24 Sep 2013 04:05:54 -0700 (PDT) In-Reply-To: References: Date: Tue, 24 Sep 2013 16:35:54 +0530 Message-ID: Subject: Re: [jira] [Updated] (SYNAPSE-955) XPath1.0 Implementation On Top Of XMLStream From: Isuru Ranawaka To: dev@synapse.apache.org Content-Type: multipart/alternative; boundary=089e011779b5e1e06404e71f1e08 X-Virus-Checked: Checked by ClamAV on apache.org --089e011779b5e1e06404e71f1e08 Content-Type: text/plain; charset=ISO-8859-1 hi, yes i have fixed those issues and attached the patch . thanks On Mon, Sep 23, 2013 at 8:28 PM, Kasun Indrasiri wrote: > Hi Isuru, > > Did you manage to find the root cause of this? > > > On Fri, Sep 20, 2013 at 9:35 AM, Isuru Ranawaka wrote: > >> >> hi , >> i will look in to those problems and fix them soon. >> >> thanks >> isuru >> >> >> On Fri, Sep 20, 2013 at 12:42 AM, Kasun Indrasiri wrote: >> >>> Also, if we use different streams instances without instantiating >>> the XMLStreamingXPath, looks like the previous the result got appended to >>> the second evaluated value. >>> >>> String exampleXML = >>> "\n" + >>> "\n" + " \n" + >>> " \n" + >>> " kasun\n" + >>> " \n" + >>> " "; >>> String exampleXML2 = >>> "\n" + >>> "\n" + " \n" + >>> " \n" + >>> " kasun\n" + >>> " \n" + >>> " "; >>> >>> InputStream inputStream = new >>> ByteArrayInputStream(exampleXML.getBytes()); >>> String xpathString = "/getQuote/request/symbol"; >>> XMLStreamingXPath xmlStreamingXPath = new XMLStreamingXPath(); >>> xmlStreamingXPath.setXpathQuery(xpathString); >>> >>> String val1 = (String)xmlStreamingXPath.getValueOf(inputStream); >>> String val2 = (String) xmlStreamingXPath.getValueOf(new >>> ByteArrayInputStream(exampleXML2.getBytes())); >>> System.out.println("Val " + val1); >>> System.out.println("Val " + val2); >>> >>> --- output -- >>> Val kasun >>> Val kasunkasun >>> >>> >>> On Thu, Sep 19, 2013 at 11:15 PM, Kasun Indrasiri wrote: >>> >>>> Hi Isuru, >>>> >>>> See my comments below. >>>> >>>> - We may have room to improve the API of the xmlstreaming xpath and >>>> current api need to be cleaned up a bit. >>>> - We need to add namespace support in xmlstream based xpath impl as it >>>> is commonly used in most integration scenarios. >>>> - xmlstreamingxpath is currently under synapse core utils and its >>>> pretty much independent from synapse. We might move it some other module >>>> than synapse-core. >>>> - Also during testing, I found some limitations with text nodes(text()). >>>> We can work on improving those aspects as well. >>>> - And I think we are good to go ahead with performance comparison for >>>> CBR with xmlstream xpath and existing xpath support. >>>> >>>> Thanks. >>>> >>>> [1] http://www.w3.org/TR/xpath/ >>>> >>>> >>>> On Mon, Sep 2, 2013 at 9:56 AM, Kasun Indrasiri wrote: >>>> >>>>> Hi Isuru, >>>>> >>>>> I will review the patch and get back to you. In the mean time, we can >>>>> move ahead with a perf tests which compares the existing and new >>>>> implementations. >>>>> >>>>> >>>>> On Fri, Aug 30, 2013 at 8:23 AM, isuru janith ranawaka (JIRA) < >>>>> jira@apache.org> wrote: >>>>> >>>>>> >>>>>> [ >>>>>> https://issues.apache.org/jira/browse/SYNAPSE-955?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel] >>>>>> >>>>>> isuru janith ranawaka updated SYNAPSE-955: >>>>>> ------------------------------------------ >>>>>> >>>>>> Attachment: xmlstreamingxpathv_2.patch >>>>>> >>>>>> Integrated to synapse. patch taken from trunk/java >>>>>> >>>>>> > XPath1.0 Implementation On Top Of XMLStream >>>>>> > ------------------------------------------- >>>>>> > >>>>>> > Key: SYNAPSE-955 >>>>>> > URL: >>>>>> https://issues.apache.org/jira/browse/SYNAPSE-955 >>>>>> > Project: Synapse >>>>>> > Issue Type: Improvement >>>>>> > Components: Core >>>>>> > Affects Versions: FUTURE >>>>>> > Reporter: isuru janith ranawaka >>>>>> > Assignee: Andreas Veithen >>>>>> > Priority: Minor >>>>>> > Labels: 2013, gsoc >>>>>> > Attachments: xmlstreamingxpath.patch, >>>>>> xmlstreamingxpathv_2.patch >>>>>> > >>>>>> > >>>>>> > Current SynapseXPath is operates on top of the Axiom Object Model >>>>>> and this project is for evaluate XPath On top of the XMLStream. >>>>>> XMLStreamReader is given as input and the resulting output is given as >>>>>> OMElements. >>>>>> >>>>>> -- >>>>>> This message is automatically generated by JIRA. >>>>>> If you think it was sent incorrectly, please contact your JIRA >>>>>> administrators >>>>>> For more information on JIRA, see: >>>>>> http://www.atlassian.com/software/jira >>>>>> >>>>>> --------------------------------------------------------------------- >>>>>> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org >>>>>> For additional commands, e-mail: dev-help@synapse.apache.org >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Kasun Indrasiri >>>>> Associate Technical Lead, >>>>> WSO2 Inc. - "Lean . Enterprise . Middleware" - http://www.wso2.com/ >>>>> Blog : http://kasunpanorama.blogspot.com/ >>>>> >>>> >>>> >>>> >>>> -- >>>> Kasun Indrasiri >>>> Associate Technical Lead, >>>> WSO2 Inc. - "Lean . Enterprise . Middleware" - http://www.wso2.com/ >>>> Blog : http://kasunpanorama.blogspot.com/ >>>> >>> >>> >>> >>> -- >>> Kasun Indrasiri >>> Associate Technical Lead, >>> WSO2 Inc. - "Lean . Enterprise . Middleware" - http://www.wso2.com/ >>> Blog : http://kasunpanorama.blogspot.com/ >>> >> >> > > > -- > Kasun Indrasiri > Associate Technical Lead, > WSO2 Inc. - "Lean . Enterprise . Middleware" - http://www.wso2.com/ > Blog : http://kasunpanorama.blogspot.com/ > --089e011779b5e1e06404e71f1e08 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
hi,

yes i have fixed those issues a= nd attached the patch .

thanks


On Mon, Sep 23, 2013 at 8:28 PM, Ka= sun Indrasiri <kasun147@gmail.com> wrote:
Hi Isuru,

Did you manage to find the root cause of this?=A0


On Fri, Sep 20, 2013 at 9:35 AM, Isuru Ranawaka <= irjanith@gmail.com<= /a>> wrote:

hi ,
i will look in to those problems and fix them soon.
thanks
isuru


On Fri, Sep 20, 2013 at 12:42 AM, Kasun Indrasiri <kasun147@gmail.com= > wrote:
Also, if we use different s= treams instances without instantiating the=A0XMLStreamingXPath, looks like = the previous the result got appended to the second evaluated value.=A0

=A0 =A0 =A0 =A0 String exampleXML =3D
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "<?xml version=3D\"1.0\&q= uot; encoding=3D\"ISO-8859-1\"?>\n" +
=A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "\n" + " =A0 =A0 =A0= <getQuote>\n" +
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 " =A0 =A0 =A0 =A0 <request>\n" +
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 " =A0 =A0 =A0 =A0= =A0 =A0<symbol>kasun</symbol>\n" +
=A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 " =A0 =A0 =A0 =A0 </request>= \n" +
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "= =A0 =A0 =A0</getQuote>";
=A0 =A0 =A0 =A0 String exampleXML2 =3D
=A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 "<?xml version=3D\"1.0\" encoding=3D\"IS= O-8859-1\"?>\n" +
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 "\n" + " =A0 =A0 =A0<getQuote>\n"= +
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 " =A0 =A0 =A0 =A0= <request>\n" +
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 " =A0 =A0 =A0 =A0 =A0 =A0<symbol>kasun</symbol>= ;\n" +
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "= ; =A0 =A0 =A0 =A0 </request>\n" +
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 " =A0 =A0 =A0<= /getQuote>";

=A0 =A0 =A0 =A0 InputStream i= nputStream =3D new ByteArrayInputStream(exampleXML.getBytes());
= =A0 =A0 =A0 =A0 String xpathString =3D "/getQuote/request/symbol"= ;
=A0 =A0 =A0 =A0 XMLStreamingXPath xmlStreamingXPath =3D new XMLStreami= ngXPath();
=A0 =A0 =A0 =A0 xmlStreamingXPath.setXpathQuery(xpathS= tring);

=A0 =A0 =A0 =A0 String val1 =3D (String)xm= lStreamingXPath.getValueOf(inputStream);
=A0 =A0 =A0 =A0 String val2 =3D (String) xmlStreamingXPath.getValueOf(= new ByteArrayInputStream(exampleXML2.getBytes()));
=A0 =A0 =A0 = =A0 System.out.println("Val " + val1);
=A0 =A0 =A0 =A0 = System.out.println("Val " + val2);

--- output --
Val <symbol>ka= sun</symbol>
Val <symbol>kasun</symbol><symb= ol>kasun</symbol>


On Thu, Sep 19, 2013 at 11:15 PM, Kasun = Indrasiri <kasun147@gmail.com> wrote:
Hi Isuru,

See my comments below.=A0
=

- We may have room to improve the API of the xmlstreami= ng xpath and current api need to be cleaned up a bit.=A0
- We nee= d to add namespace support in xmlstream based xpath impl as it is commonly = used in most integration scenarios.=A0
-=A0xmlstreamingxpath is currently under synapse core util= s and its pretty much independent from synapse. We might move it some other= module than synapse-core.=A0
- Also during testing, I found = some limitations with text nodes(text()). We can work on improving those aspects as well= .=A0
- And I think we are good to go ahead with performance comparison for = CBR with xmlstream xpath and existing xpath support.=A0


On Mon, Sep 2, 2013 at 9:56 AM, Kasun Indrasiri <kasun147@gmail.com> wrote:
Hi Isuru,=A0

=
I will review the patch and get back to you. In the mean time, we can = move ahead with a perf tests which compares the existing and new implementa= tions.=A0


On Fri, Aug 30, 2013 at 8:23 AM, isuru j= anith ranawaka (JIRA) <jira@apache.org> wrote:

=A0 =A0 =A0[ https://issues.apache.org/jira/browse/SYNAPSE-955?page=3Dcom.at= lassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

isuru janith ranawaka updated SYNAPSE-955:
------------------------------------------

=A0 =A0 Attachment: xmlstreamingxpathv_2.patch

Integrated to synapse. patch taken from trunk/java

> XPath1.0 Implementation On Top Of XMLStream
> -------------------------------------------
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Key: SYNAPSE-955
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 URL: https://issues.apache.org/ji= ra/browse/SYNAPSE-955
> =A0 =A0 =A0 =A0 =A0 =A0 Project: Synapse
> =A0 =A0 =A0 =A0 =A0Issue Type: Improvement
> =A0 =A0 =A0 =A0 =A0Components: Core
> =A0 =A0Affects Versions: FUTURE
> =A0 =A0 =A0 =A0 =A0 =A0Reporter: isuru janith ranawaka
> =A0 =A0 =A0 =A0 =A0 =A0Assignee: Andreas Veithen
> =A0 =A0 =A0 =A0 =A0 =A0Priority: Minor
> =A0 =A0 =A0 =A0 =A0 =A0 =A0Labels: 2013, gsoc
> =A0 =A0 =A0 =A0 Attachments: xmlstreamingxpath.patch, xmlstreami= ngxpathv_2.patch
>
>
> Current SynapseXPath is operates on top of the Axiom Object Model and = this project is for evaluate XPath On top of the XMLStream. XMLStreamReader= is given as input and the resulting output is given as OMElements.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrato= rs
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org




<= /div>--
Kasun Indrasiri
Asso= ciate Technical Lead,
WSO2 Inc. - "Lean . Enterprise . Middleware" - http://www.wso2.com/
Blog : htt= p://kasunpanorama.blogspot.com/



--
Kasun Indras= iri
Associate Technical Lead,
WSO2 Inc. - "Lean= . Enterprise . Middleware" - http://www.wso2.com/
Blog : htt= p://kasunpanorama.blogspot.com/



--
= Kasun Indrasiri
Associate Technical Lead,
WSO2 Inc. = - "Lean . Enterprise . Middleware" - http://www.wso2.com/
Blog : htt= p://kasunpanorama.blogspot.com/




--
= Kasun Indrasiri
Associate Technical Lead,
WSO2 Inc. = - "Lean . Enterprise . Middleware" - http://www.wso2.com/
Blog : htt= p://kasunpanorama.blogspot.com/

--089e011779b5e1e06404e71f1e08--