Google Summer of Code 2008 – Project proposal


XPath Language for Axiom/C

Student Name

Varuna Jayasiri


vpjayasiri at gmail dot com


Axiom is the XML infoset model of Apache Axis2/C. However Axiom does not have XPath support, and it is very useful to have XPath language support for Axiom.

This project is to develop an XPath extension for Axiom. Its purpose is to make it convenient for modules, services and clients to query data.


This project can be divided into two main areas: XPath parser and XPath engine. These two are separated to make the code manageable and extendable.

XPath parser has the responsibility to parse XPath expressions. Since XPath 1.0 implementation is sufficient at this stage I will be implementing a XPath 1.0 1 parser; however, specifications of XPath 2.02 will be considered during the design so that it is not hard to add XPath 2.0 support. XPath parser will handle all parse errors and log them if necessary.

Parsed XPath expressions will then be processed by the XPath engine. It will return results as pointers to elements of the XML tree (whenever it is possible), so that it is possible to change contents of the elements of the tree; thus, enabling the creation of Axiom trees (Similar to libxml).

Since XPath parser is not tightly coupled with the XPath engine it’ll be possible to implement newer versions of XPath specifications without changing the code of XPath engine. Also, any improvements of the engine will not affect the parser.

API’s of existing XPath engines such as Jaxen3, libxml XPath module4, Saxon5, Xalan-J6, and .NET XPath API7 will also be considered in designing the API. A sample API is added to Overview of API. Facilities provided by Axis (such as logging, data structures, etc) will be used wherever possible.

I will write unit tests to test each of the modules of code I write so that a reliable XPath extension could be provided. And I will try to develop deliverables regularly as possible so that the community can try it out and give suggestions.

At this stage a higher priority will be given to designing a solid API and writing manageable code, but sufficient consideration will be given to the performance of the XPath engine.


1. XPath extension for Axiom.

2. Unit test cases.

3. XPath API documentation and a manual.


1. Analysis and Information Gathering

Get more ideas about required API, features and algorithms from the community, and familiarize myself with Axis, Axiom and XPath querying.

-until mid May

2. Design

Design the XPath extension, and plan the development process broken down into stages, with the help of the mentor.

-until end of May

Deliverables: API and Design documentation

3. Implementation

Implement the XPath parser and XPath Engine. Small changes may done to the design at this stage. Components will be implemented such that usable pieces can be released regularly (for review as well as for use). Documentations and unit tests will also be constructed at this stage.

-until mid August

Deliverables: A running XPath extension for Axiom

4. Final Touch

Running complete tests with the help of the community and doing final touches to the code and documentations. Manual will also be completed at this stage. -until end of August

Deliverables: Completed XPath extension with documentation and test data


I’ve been very enthusiastic about computers from my early ages and I participated in International Olympiad in Informatics 4 times and won a gold medal and 2 silver medals. I also participated at ACM regional’s in Kanpur8, India with the team which was placed fourth. I was also in the team that developed Sinhala Search – the first Sinhala search engine9. I have worked as a SAP developer at MAS Intimates and as a web developer at Paradox Software.

I am studying at the Faculty of Engineering, University of Moratuwa, Sri Lanka. I have been blogging for around 1 year – Something Different, and I participate in Topcoder10 competitions regularly.

Although I haven't been involved in open source projects before I have been doing similar projects at my workplaces, and I have about 5 years of experience of programming with C/C++. Therefore, I think I will be able to develop a robust XPath extension for Axiom.


  1. [ XPath 1.0 Specification] (1)

  2. [ XPath 2.0 Specification] (2)

  3. [ jaxen: universal Java XPath engine] (3)

  4. [ Module xpath from libxml2] (4)

  5. [ The SAXON XSLT and XQuery Processor] (5)

  6. [ Xalan-J] (6)

  7. [,printer).aspx .NET XPath Library] (7)

  8. [ ACM Regionals Kanpur] (8)

  9. [ Sinhala Search] - site is currently unavailable due to maintenance :P (9)

  10. [ My Topcoder Profile] (10)