You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Divye Kapoor <di...@gmail.com> on 2008/03/21 12:52:58 UTC

Google Summer of Code - Implementation of the XPath specification in Axis/C

Hello all,
   I'm a Second Year student of Computer Science at the Indian
 Institute of Technology, Roorkee and I'm interested in pursuing a GSoC
 project with the ASF. Though I have no experience with Axis and Axiom,
 I have programming experience in C/C++ and other scripting languages
 and have practical experience with XML and its related technologies.

   The posting on the ideas page
 regarding an implementation of the XPath specification for Axiom did
 not detail the nature of integration expected with the rest of the
 code base. Would it be simply (so to speak) a free-floating component
 or be integrated with some of the other parts of the Axis or Axiom
 code? Also, what kind of XML handling support is already integrated
 into Axiom?
   Please bear with me if my questions seem naive.

 Yours sincerely,
 Divye Kapoor



-- 
Whether the chicken crossed the road or the road moved beneath the
chicken depends upon your frame of reference.
My official web site: http://www.iitr.ernet.in/studenthomepages/homepages/061305

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


Re: Google Summer of Code - Implementation of the XPath specification in Axis/C

Posted by Senaka Fernando <se...@wso2.com>.
Hi all,

> On Sat, Mar 22, 2008 at 10:36 PM, Supun Kamburugamuva <su...@gmail.com>
> wrote:
>> Hi Divye,
>>
>>
>>  >  You should ideally make use of the XML reader/write API, but the
>> AXIOMs
>>  >  XPath implementation should be independent of the underlying parser.
>>  >  Meaning that we should be able to pluggin any new parser through a
>> wrapper
>>  >  and make use of your implementation.
>>  >
>>
>>  AFAIK we don't have to worry about the underlying XML readers and
>>  writers.
>
> Yes, the basic idea is to implement XPath at Axiom level, so that we
> don't have to worry about what the underlying parser is.
>
>>  Also we don't expect XPath to be integrated in to the Axis2/C or any
>>  modules that goes with it for this project. Actually the need for
>>  XPath is with the Rampart/C implementation but at the moment you don't
>>  have to consider these details.
>
> I believe that we should integrate it to Axiom, so that others can
> benefit too. Of course, the immediate concern is Rampart (where
> WS-Security and other security related specifications are
> implemented), but if we can get it at the right place early, it will
> save lot many problems we may face in the future.

XPath can also be used to further improve the Axis2/C REST implementation.
However, this is not an immediate concern.

>
> Btw, there was a small mistake in the project description, the third
> line should have been "This project is to implement XPath Language 1.0
> *and 2.0 or only 1.0*...". In essence, XPath 1.0 is absolutely
> necessary, and I think we better drop 2.0 support, since: 1) it is not
> a necessity for the Axis2 project at the moment. 2) I think
> implementing XPath 1.0 is more than enough work itself. Any comments?

Depends on the approach you take. However, if 1.0 -> 2.0 is a real
difficuilt conversion, that can be left out.

Regards,
Senaka

>
> Regards,
> Dumindu.
>
> --
> Dumindu Pallewela
> http://blog.dumindu.com
> GPG ID: 0x9E131672
>
> WSO2 | "Oxygenating the Web Service Platform" | http://wso2.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>
>


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


Re: Google Summer of Code - Implementation of the XPath specification in Axis/C

Posted by Kaushalye Kapuruge <ka...@wso2.com>.
Hi Kapoor,
IMO its better to document your API in a wiki. Something like this[1] we 
added for Apache Rampart/C.
In that way other devs can also participate in the discussion and nobody 
will be lost in a mail thread. I think the page should be under 
http://wiki.apache.org/ws/axiom. (Devs please verify).
Also I'd like to suggest you to use the util[2] section available in 
Axis2/C.
In your function

axiom_xpath_parse(axiom_xpath_context *ctx, const char * xpath_str, int len)

You may use axis2_char_t* in place of (const char * xpath_str, int len )

Also it provides error handling, logging, data structures and other 
useful utilities you can easily use in your XPath implementation.
I think you are moving in the right direction. it's better to use Java 
implementation as a reference as you might not need to pull your hair 
out for already solved problems.
For the automated testing, I'd rather suggest that you create your own 
test cases. And run(or automate) them while developing. At least that's 
what I did.

Good luck!!!

-Kaushalye



[1]http://wiki.apache.org/ws/rampartc/pkcs12_API
[2]http://svn.apache.org/repos/asf/webservices/axis2/trunk/c/util/include

Divye Kapoor wrote:
> Hello all,
>    Thank you for the clarifications. I'm sorry for the late reply as I
> was travelling back to college from my hometown.
>
> First of all, while implementing the XPath specification, I would like
> to create a family of functions with a signature set like:
> axiom_xpath_parse(axiom_xpath_context *ctx, const char * xpath_str, int len)
> where an axiom_xpath_context structure will contain an
> axiom_xml_reader_t * and other assorted contextual info.
>
> Similarly,
> axiom_xpath_*(...) functions have to be implemented according to
>
> http://ws.apache.org/commons/axiom/apidocs/org/apache/axiom/om/xpath/DocumentNavigator.html
>
> so that I can stick to the java behaviour of Axiom.
>
> While implementing this behaviour, the only thing that I will have to
> depend upon will be the parser abstraction layer specified by the
> axiom_xml_reader.c and axiom_xml_writer.c
>
> 1. This is the gist of what I've gathered from this discussion. Am I
> proceeding in the right direction?
>
> 2. Also, what kind of automated testing is being used for code
> proofing? I would rather build a small and correct implementation
> rather than a buggy implementation of a larger subset of the api.
>
> Looking for your guidance and comments,
>
> Divye Kapoor
>
>
>
>   


-- 
http://blog.kaushalye.org/
http://wso2.org/


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


Re: Google Summer of Code - Implementation of the XPath specification in Axis/C

Posted by Divye Kapoor <di...@gmail.com>.
Hello all,
   Thank you for the clarifications. I'm sorry for the late reply as I
was travelling back to college from my hometown.

First of all, while implementing the XPath specification, I would like
to create a family of functions with a signature set like:
axiom_xpath_parse(axiom_xpath_context *ctx, const char * xpath_str, int len)
where an axiom_xpath_context structure will contain an
axiom_xml_reader_t * and other assorted contextual info.

Similarly,
axiom_xpath_*(...) functions have to be implemented according to

http://ws.apache.org/commons/axiom/apidocs/org/apache/axiom/om/xpath/DocumentNavigator.html

so that I can stick to the java behaviour of Axiom.

While implementing this behaviour, the only thing that I will have to
depend upon will be the parser abstraction layer specified by the
axiom_xml_reader.c and axiom_xml_writer.c

1. This is the gist of what I've gathered from this discussion. Am I
proceeding in the right direction?

2. Also, what kind of automated testing is being used for code
proofing? I would rather build a small and correct implementation
rather than a buggy implementation of a larger subset of the api.

Looking for your guidance and comments,

Divye Kapoor



-- 
Whether the chicken crossed the road or the road moved beneath the
chicken depends upon your frame of reference.
My official web site: http://www.iitr.ernet.in/studenthomepages/homepages/061305

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


Re: Google Summer of Code - Implementation of the XPath specification in Axis/C

Posted by Supun Kamburugamuva <su...@gmail.com>.
On 3/23/08, Dumindu Pallewela <pa...@gmail.com> wrote:
> On Sat, Mar 22, 2008 at 10:36 PM, Supun Kamburugamuva <su...@gmail.com> wrote:
>  > Hi Divye,
>  >
>  >
>  >  >  You should ideally make use of the XML reader/write API, but the AXIOMs
>  >  >  XPath implementation should be independent of the underlying parser.
>  >  >  Meaning that we should be able to pluggin any new parser through a wrapper
>  >  >  and make use of your implementation.
>  >  >
>  >
>  >  AFAIK we don't have to worry about the underlying XML readers and
>  >  writers.
>
>
> Yes, the basic idea is to implement XPath at Axiom level, so that we
>  don't have to worry about what the underlying parser is.
>
>
>  >  Also we don't expect XPath to be integrated in to the Axis2/C or any
>  >  modules that goes with it for this project. Actually the need for
>  >  XPath is with the Rampart/C implementation but at the moment you don't
>  >  have to consider these details.
>
>
> I believe that we should integrate it to Axiom, so that others can
>  benefit too. Of course, the immediate concern is Rampart (where
>  WS-Security and other security related specifications are
>  implemented), but if we can get it at the right place early, it will
>  save lot many problems we may face in the future.
>

I agree with you. I guess my previous mail is little bit confusing.
Also I assume that the integration that you mentioned, is not about
changing the current Axiom/C code but making the XPath implementation
work on top of the Axiom/C model.

Regards,
Supun..

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


Re: Google Summer of Code - Implementation of the XPath specification in Axis/C

Posted by Dumindu Pallewela <pa...@gmail.com>.
On Sat, Mar 22, 2008 at 10:36 PM, Supun Kamburugamuva <su...@gmail.com> wrote:
> Hi Divye,
>
>
>  >  You should ideally make use of the XML reader/write API, but the AXIOMs
>  >  XPath implementation should be independent of the underlying parser.
>  >  Meaning that we should be able to pluggin any new parser through a wrapper
>  >  and make use of your implementation.
>  >
>
>  AFAIK we don't have to worry about the underlying XML readers and
>  writers.

Yes, the basic idea is to implement XPath at Axiom level, so that we
don't have to worry about what the underlying parser is.

>  Also we don't expect XPath to be integrated in to the Axis2/C or any
>  modules that goes with it for this project. Actually the need for
>  XPath is with the Rampart/C implementation but at the moment you don't
>  have to consider these details.

I believe that we should integrate it to Axiom, so that others can
benefit too. Of course, the immediate concern is Rampart (where
WS-Security and other security related specifications are
implemented), but if we can get it at the right place early, it will
save lot many problems we may face in the future.

Btw, there was a small mistake in the project description, the third
line should have been "This project is to implement XPath Language 1.0
*and 2.0 or only 1.0*...". In essence, XPath 1.0 is absolutely
necessary, and I think we better drop 2.0 support, since: 1) it is not
a necessity for the Axis2 project at the moment. 2) I think
implementing XPath 1.0 is more than enough work itself. Any comments?

Regards,
Dumindu.

-- 
Dumindu Pallewela
http://blog.dumindu.com
GPG ID: 0x9E131672

WSO2 | "Oxygenating the Web Service Platform" | http://wso2.com

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


Re: Google Summer of Code - Implementation of the XPath specification in Axis/C

Posted by Supun Kamburugamuva <su...@gmail.com>.
Hi Divye,

>  You should ideally make use of the XML reader/write API, but the AXIOMs
>  XPath implementation should be independent of the underlying parser.
>  Meaning that we should be able to pluggin any new parser through a wrapper
>  and make use of your implementation.
>

AFAIK we don't have to worry about the underlying XML readers and
writers. XPath should be working on the Axiom/C node tree.  At the
very abstract level an XPath expression should be evaluated on top of
an Axiom/C node and should give a result (possibly an Axiom/C node
set) depending on the expression and Axiom/C node tree.

Also we don't expect XPath to be integrated in to the Axis2/C or any
modules that goes with it for this project. Actually the need for
XPath is with the Rampart/C implementation but at the moment you don't
have to consider these details.

Regards,
Supun..

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


Re: Google Summer of Code - Implementation of the XPath specification in Axis/C

Posted by Manjula Peiris <ma...@wso2.com>.
Hi Divye,

This is some addition to what Senaka and Dimuthu mentioned. Since you
need to prepare a good proposal it is very important to identify what
you can and cannot do for this project. The best thing to do is go
through the XPath spec and some other XPath implementations and identify
the common usecases and important areas. Then try to come up with an API
addition to Axiom for XPath. This API should cover the full spec, but
for the summer of code project you do not need implement all. But
implementing the basic XPath support is crucial. You can discuss it with
your mentor or in this list.

Thanks,
-Manjula.  


On Sat, 2008-03-22 at 20:22 +0530, Senaka Fernando wrote:
> Hi Divye,
> 
> You will have to integrate XPath support into AXIOM and you can make use
> of the utilities made available in Util as Dimuthu says.
> 
> You should ideally make use of the XML reader/write API, but the AXIOMs
> XPath implementation should be independent of the underlying parser.
> Meaning that we should be able to pluggin any new parser through a wrapper
> and make use of your implementation.
> 
> You need not create a free-floating component which would be somewhat
> tougher than the embedded implmentation AFAIU.
> 
> Apache Axis2/C Axiom is and Apache AXIOM (Java) are based on the same
> architecture, which has somewhat deferred due to C not being an OO
> Langauge. But, you are strongly adviced to follow the Apache AXIOM
> implementation as much as possible. I believe that [1] should be really
> useful in this concern.
> 
> [1] http://ws.apache.org/commons/axiom/apidocs/index.html
> 
> Regards,
> Senaka
> 
> > Hi Divye,
> >
> >  XPath expression evaluation is a major missing part of Axiom C
> > implementation, and it is a really good GSOC project. So glad to see
> > you are interested in that.
> >
> > Answering to your questions according to my knowledge, XPath
> > implementation will be depend on axis2 util  and axiom project and
> > will be part of axiom. You can check this for a good axiom/c
> > tutorial[1],
> >
> > Axiom is given a xml reader/writer api so the complexities of xml
> > parsing is hidden from the Axiom, And this allow us to integrate many
> > xml parsers to the axiom, currently we have guththila and libxml2
> > intergrated. So in the xpath implementation you will be working on top
> > of axiom or the xml reader API, I think this depends on your design.
> >
> > In the same time you  can use the axiom/java[2] XPath implementation
> > as a reference. And it is really important you follow that, since
> > axiom/c is a reimplementation of axiom/java.
> >
> >
> > [1] http://ws.apache.org/axis2/c/docs/om_tutorial.html
> > [2] http://ws.apache.org/commons/axiom/
> >
> > Thanks
> > Dimuthu
> >
> > On Fri, Mar 21, 2008 at 5:22 PM, Divye Kapoor <di...@gmail.com>
> > wrote:
> >> Hello all,
> >>    I'm a Second Year student of Computer Science at the Indian
> >>   Institute of Technology, Roorkee and I'm interested in pursuing a GSoC
> >>   project with the ASF. Though I have no experience with Axis and Axiom,
> >>   I have programming experience in C/C++ and other scripting languages
> >>   and have practical experience with XML and its related technologies.
> >>
> >>    The posting on the ideas page
> >>   regarding an implementation of the XPath specification for Axiom did
> >>   not detail the nature of integration expected with the rest of the
> >>   code base. Would it be simply (so to speak) a free-floating component
> >>   or be integrated with some of the other parts of the Axis or Axiom
> >>   code?
> >
> > Also, what kind of XML handling support is already integrated
> >>   into Axiom?
> >>    Please bear with me if my questions seem naive.
> >>
> >>   Yours sincerely,
> >>   Divye Kapoor
> >>
> >>
> >>
> >>  --
> >>  Whether the chicken crossed the road or the road moved beneath the
> >>  chicken depends upon your frame of reference.
> >>  My official web site:
> >> http://www.iitr.ernet.in/studenthomepages/homepages/061305
> >>
> >>  ---------------------------------------------------------------------
> >>  To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> >>  For additional commands, e-mail: axis-c-dev-help@ws.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-c-dev-help@ws.apache.org
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
> 


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


Re: Google Summer of Code - Implementation of the XPath specification in Axis/C

Posted by Senaka Fernando <se...@wso2.com>.
Hi Divye,

You will have to integrate XPath support into AXIOM and you can make use
of the utilities made available in Util as Dimuthu says.

You should ideally make use of the XML reader/write API, but the AXIOMs
XPath implementation should be independent of the underlying parser.
Meaning that we should be able to pluggin any new parser through a wrapper
and make use of your implementation.

You need not create a free-floating component which would be somewhat
tougher than the embedded implmentation AFAIU.

Apache Axis2/C Axiom is and Apache AXIOM (Java) are based on the same
architecture, which has somewhat deferred due to C not being an OO
Langauge. But, you are strongly adviced to follow the Apache AXIOM
implementation as much as possible. I believe that [1] should be really
useful in this concern.

[1] http://ws.apache.org/commons/axiom/apidocs/index.html

Regards,
Senaka

> Hi Divye,
>
>  XPath expression evaluation is a major missing part of Axiom C
> implementation, and it is a really good GSOC project. So glad to see
> you are interested in that.
>
> Answering to your questions according to my knowledge, XPath
> implementation will be depend on axis2 util  and axiom project and
> will be part of axiom. You can check this for a good axiom/c
> tutorial[1],
>
> Axiom is given a xml reader/writer api so the complexities of xml
> parsing is hidden from the Axiom, And this allow us to integrate many
> xml parsers to the axiom, currently we have guththila and libxml2
> intergrated. So in the xpath implementation you will be working on top
> of axiom or the xml reader API, I think this depends on your design.
>
> In the same time you  can use the axiom/java[2] XPath implementation
> as a reference. And it is really important you follow that, since
> axiom/c is a reimplementation of axiom/java.
>
>
> [1] http://ws.apache.org/axis2/c/docs/om_tutorial.html
> [2] http://ws.apache.org/commons/axiom/
>
> Thanks
> Dimuthu
>
> On Fri, Mar 21, 2008 at 5:22 PM, Divye Kapoor <di...@gmail.com>
> wrote:
>> Hello all,
>>    I'm a Second Year student of Computer Science at the Indian
>>   Institute of Technology, Roorkee and I'm interested in pursuing a GSoC
>>   project with the ASF. Though I have no experience with Axis and Axiom,
>>   I have programming experience in C/C++ and other scripting languages
>>   and have practical experience with XML and its related technologies.
>>
>>    The posting on the ideas page
>>   regarding an implementation of the XPath specification for Axiom did
>>   not detail the nature of integration expected with the rest of the
>>   code base. Would it be simply (so to speak) a free-floating component
>>   or be integrated with some of the other parts of the Axis or Axiom
>>   code?
>
> Also, what kind of XML handling support is already integrated
>>   into Axiom?
>>    Please bear with me if my questions seem naive.
>>
>>   Yours sincerely,
>>   Divye Kapoor
>>
>>
>>
>>  --
>>  Whether the chicken crossed the road or the road moved beneath the
>>  chicken depends upon your frame of reference.
>>  My official web site:
>> http://www.iitr.ernet.in/studenthomepages/homepages/061305
>>
>>  ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
>>  For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>
>


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


Re: Google Summer of Code - Implementation of the XPath specification in Axis/C

Posted by Dimuthu Gamage <di...@gmail.com>.
Hi Divye,

 XPath expression evaluation is a major missing part of Axiom C
implementation, and it is a really good GSOC project. So glad to see
you are interested in that.

Answering to your questions according to my knowledge, XPath
implementation will be depend on axis2 util  and axiom project and
will be part of axiom. You can check this for a good axiom/c
tutorial[1],

Axiom is given a xml reader/writer api so the complexities of xml
parsing is hidden from the Axiom, And this allow us to integrate many
xml parsers to the axiom, currently we have guththila and libxml2
intergrated. So in the xpath implementation you will be working on top
of axiom or the xml reader API, I think this depends on your design.

In the same time you  can use the axiom/java[2] XPath implementation
as a reference. And it is really important you follow that, since
axiom/c is a reimplementation of axiom/java.


[1] http://ws.apache.org/axis2/c/docs/om_tutorial.html
[2] http://ws.apache.org/commons/axiom/

Thanks
Dimuthu

On Fri, Mar 21, 2008 at 5:22 PM, Divye Kapoor <di...@gmail.com> wrote:
> Hello all,
>    I'm a Second Year student of Computer Science at the Indian
>   Institute of Technology, Roorkee and I'm interested in pursuing a GSoC
>   project with the ASF. Though I have no experience with Axis and Axiom,
>   I have programming experience in C/C++ and other scripting languages
>   and have practical experience with XML and its related technologies.
>
>    The posting on the ideas page
>   regarding an implementation of the XPath specification for Axiom did
>   not detail the nature of integration expected with the rest of the
>   code base. Would it be simply (so to speak) a free-floating component
>   or be integrated with some of the other parts of the Axis or Axiom
>   code?

Also, what kind of XML handling support is already integrated
>   into Axiom?
>    Please bear with me if my questions seem naive.
>
>   Yours sincerely,
>   Divye Kapoor
>
>
>
>  --
>  Whether the chicken crossed the road or the road moved beneath the
>  chicken depends upon your frame of reference.
>  My official web site: http://www.iitr.ernet.in/studenthomepages/homepages/061305
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
>  For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>
>

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