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 04A15106C0 for ; Fri, 20 Sep 2013 01:36:22 +0000 (UTC) Received: (qmail 48978 invoked by uid 500); 20 Sep 2013 01:36:21 -0000 Delivered-To: apmail-synapse-dev-archive@synapse.apache.org Received: (qmail 48903 invoked by uid 500); 20 Sep 2013 01:36:21 -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 48892 invoked by uid 99); 20 Sep 2013 01:36:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Sep 2013 01:36:21 +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 (athena.apache.org: domain of irjanith@gmail.com designates 74.125.82.46 as permitted sender) Received: from [74.125.82.46] (HELO mail-wg0-f46.google.com) (74.125.82.46) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Sep 2013 01:36:17 +0000 Received: by mail-wg0-f46.google.com with SMTP id k14so8721435wgh.25 for ; Thu, 19 Sep 2013 18:35:56 -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=dGg+kjaW/11S0hD+Fin4/Qgd0mKa9Z7jYtUfB1vsGLg=; b=SE0Mlls8gNZqfKI9ihboGI3l3Vhue0fR6jh6e/JEiEAIOVfDyh/SzQGll9WAf+DSPE eH9vZRsBMVrJn4TKaWCLly/jRk0KkEd8eOW63wC6gyKC9/Ge0a2JrIgVlYK8PvKiFSva 4itA1iVM+J3YV3ba1r8lOBKVjkFQnUfea2CyqN8koQvASzzlJFxaBTJVhP4draxeONzK osoZKkGeHJbaxgsbFxAtj/sJC1nO9ryDYor1IKYdjHFUfdcPpO63lcKqIXpt8VhOTO+Q 6UsKF1dLjpdlydjZCNCPp7P6aAzXVUWMx0WqFqoZILn6PmpeJNKTccLNLQ3MX9q8jU7w f9JQ== MIME-Version: 1.0 X-Received: by 10.180.208.45 with SMTP id mb13mr628379wic.27.1379640955867; Thu, 19 Sep 2013 18:35:55 -0700 (PDT) Received: by 10.216.122.74 with HTTP; Thu, 19 Sep 2013 18:35:55 -0700 (PDT) In-Reply-To: References: Date: Fri, 20 Sep 2013 07:05:55 +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=001a11c37be4179afd04e6c6b183 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c37be4179afd04e6c6b183 Content-Type: text/plain; charset=ISO-8859-1 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/ > --001a11c37be4179afd04e6c6b183 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

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/

--001a11c37be4179afd04e6c6b183--