URI processing module

Bug #867376 reported by William Candillon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
High
Luis Rodriguez Gonzalez

Bug Description

URI processing is a very common operation in XQuery and expath http client requires a lot of URI processing,

Zorba should provide the following functions:
uri:parse($uri as xs:string) as schema-element(uri:uri)
uri:serialize($uri as schema-element(uri:uri) ) as xs:string

Related branches

Changed in zorba:
assignee: nobody (nobody-users) → Sorin Marian Nasoi (sorin.marian.nasoi)
milestone: none → 2.8
Chris Hillery (ceejatec)
Changed in zorba:
milestone: 2.8 → none
Chris Hillery (ceejatec)
Changed in zorba:
assignee: Sorin Marian Nasoi (sorin.marian.nasoi) → Luis Rodriguez Gonzalez (kuraru)
milestone: none → 2.9
Revision history for this message
Chris Hillery (ceejatec) wrote :

Luis - this should be implemented using Zorba's internal URI class (src/zorbatypes/URI.cpp), so it'll have to be a built-in module.

Suggested steps:

1. Define a schema for the <uri:uri> element in the function signatures above. It should be fairly simple - just needs child elements or attributes for all the component parts of a URI: scheme, authority, path, query, fragment, and possibly host, username, etc. See http://docs.oracle.com/javase/1.4.2/docs/api/java/net/URI.html for a good discussion of the form of a URI. Time: 1 day for initial proposal, plus some discussion.

2. Implement uri:parse() using URI.cpp to break apart the URI into a <uri:uri> element; don't forget lots of tests for all possible forms. Time: 2 days.

3. Implement uri:serialize() to put it back together again; tests. Time: 2 days.

4. Extend URI.cpp to more clearly support opaque URIs, and extend schema and module to support them. Time: 2 days.

Chris Hillery (ceejatec)
tags: added: hotist
tags: added: hotlist
removed: hotist
Changed in zorba:
status: New → In Progress
Revision history for this message
Chris Hillery (ceejatec) wrote :

As mentioned - sorry, Luis, but the current thinking is that this module should accept and produce JSON rather than XML. Please suggest a JSON object structure based on your current XML schema.

tags: added: new-functionality-requirement
removed: function-library
Changed in zorba:
status: In Progress → Fix Committed
Chris Hillery (ceejatec)
Changed in zorba:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.