You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Google Summer Of Code 2010 - Project Proposal

Project

Implementing a streamable subset for XPointer xpointer() scheme for XInclude

Student Name

Sanjaya Chathuranga Liyanage

Email

sanjayacl@gmail.com

Time Zone

UTC+5:30(Sri Lanka)

Description

XPointer framework and XPointer Element() scheme just meet very few requirements for XInclude when considering XPointer xpointer() scheme that supports to select document fragment using the xpath expressions.But when this project which will implement a streamble subset of the XPointer xpointer() scheme as a result of that Xerces' streaming XInclude processor will be improved by leaps and bounds and will be very useful.

The below mentioned example shows what kind of support XInclude in Xerces will provide when the project is done.

Let the students.xml:

<?xml version="1.0"?> <students>

  • <student id="A">
    • ..
      </student> <student id="B">
    • ..
      </student> <student id="C">
    • ..
      </student>
  • ..

</students>

When the Input is:

  • <?xml version="1.0"?> <root xmlns:xi="http://www.w3.org/2010/XInclude">
    • <xi:include href="students.xml" xpointer="xpointer(students/student[@id='C'])"/>
      </root>

Result with current XInclude: <?xml version="1.0"?> <root xmlns:xi="http://www.w3.org/2010/XInclude">

  • <student id="C">
    • ..
      </student>

</root> But when this project is done the same result can be obtained simply as below : <?xml version="1.0" ?> <root xmlns:xi="http://www.w3.org/2010/XInclude">

  • <xi:include href="students.xml" xpointer="element(/1/2)"/>

</root>

When I will begin to start the development of the code I will extend the currently existing XPath class and do the necessary developments in my child class because of two major reasons.

  1. Current XPath.Scanner inner class is very powerful and supports much more things .
  2. As the time period is limited there is no need of reimplementing the valuable methods like parseExpression.

I will replace the XPath.Scanner in my child class and modify other necessary methods in a way that it supports more symbols in the XPath expressions.And also I am going to create a method createScanner() that returns a scanner object when called from parseExpression method in my extension.Then I will do the changes for XPointer required to load the perticular subset.

Deliverables

  1. Modified Xerces source code that implements streamable subset of XPointer xpointer() scheme for XInclude
  2. Some test cases
  3. Necessary documentation.

Things Done So Far

  1. As I was not familier that much with xpath expressions I took time to go through the xpath subset like xpath axes,node() test,predicate functions,predicate operators,predicate number and string literals.
  2. I checked out the xerces trunk.
  3. Setup my development environment
  4. Just had a glance on source code.


Description

XPointer framework and XPointer Element() scheme just meet very few requirements for XInclude when considering XPointer xpointer() scheme that supports to select document fragment using the xpath expressions.But when this project which will implement a streamble subset of the XPointer xpointer() scheme as a result of that Xerces' streaming XInclude processor will be improved by leaps and bounds and will be very useful.

The below mentioned example shows what kind of support XInclude in Xerces will provide when the project is done.

Let the students.xml:

<?xml version="1.0"?> <students>

  • <student id="A">
    • ..
      </student> <student id="B">
    • ..
      </student> <student id="C">
    • ..
      </student>
  • ..

</students>

When the Input is:

  • <?xml version="1.0"?> <root xmlns:xi="http://www.w3.org/2010/XInclude">
    • <xi:include href="students.xml" xpointer="xpointer(students/student[@id='C'])"/>
      </root>

Result with current XInclude: <?xml version="1.0"?> <root xmlns:xi="http://www.w3.org/2010/XInclude">

  • <student id="C">
    • ..
      </student>

</root> But when this project is done the same result can be obtained simply as below : <?xml version="1.0" ?> <root xmlns:xi="http://www.w3.org/2010/XInclude">

  • <xi:include href="students.xml" xpointer="element(/1/2)"/>

</root>

When I will begin to start the development of the code I will extend the currently existing XPath class and do the necessary developments in my child class because of two major reasons.

  1. Current XPath.Scanner inner class is very powerful and supports much more things .
  2. As the time period is limited there is no need of reimplementing the valuable methods like parseExpression.

I will replace the XPath.Scanner in my child class and modify other necessary methods in a way that it supports more symbols in the XPath expressions.And also I am going to create a method createScanner() that returns a scanner object when called from parseExpression method in my extension.Then I will do the changes for XPointer required to load the perticular subset.

Deliverables

  1. Modified Xerces source code that implements streamable subset of XPointer xpointer() scheme for XInclude
  2. Some test cases
  3. Necessary documentation.

Things Done So Far

  1. As I was not familier that much with xpath expressions I took time to go through the xpath subset like xpath axes,node() test,predicate functions,predicate operators,predicate number and string literals.
  2. I checked out the xerces trunk.
  3. Setup my development environment
  4. Just had a glance on source code
  • No labels