OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

xri message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: XRI as structured URI

Inspired by a recent blog entry by Mark Nottingham ( http://www.mnot.net/blog/archives/000137.html ), and some internal requirements about describing "XRI namespaces", I decided to sit down and think about how one could structure the parsing and (more importantly) construction of XRIs from a template and a set of data fields.
For example, lets say I have an XRI template for XRIs identifying houses on a trash collection route
Examples of this XRI would include:
I want to be able to describe this template more formally, however, and so I set about seeing what I could do leveraging XML tools.
The first step was to define a simple XML schema for representing the structure of a XRI. This representation should be fairly rivial to convert to and from the form that we are defining in the XRI spec:
    <segment><pnode id="city">...</pnode></segment>
    <segment><pnode id="street">...</pnode></segment>
    <segment><pnode id="number">...</pnode></segment>
The next step was to add some information about what are fields:
    <description ref="city">
      <summary>The city where this location is</summary>
These above xml document constitutes a "template". To fill in the template (something an application constructing an XRI might do), a simple XML file of the following form is used:
Next, I defined an XSL stylesheet that takes the template above and "plugs in" the data fields. The result is an XML file contains the <xri><content>...</content></xri> with all the data fields filled in - in other words a structured XRI with data fields filled in. This can easily be transformed back into the form of the XRI in the specification:
I think the approach of converting the XRI to XML and processing it there with XML tools is interesting. This is just a first stab at this approach.
I'm NOT suggesting that this stuff become formalized by the TC, I'm merely suggesting that there are a lot of uses XRIs can be put to, and we can start playing with them NOW.
The XSL and sample XML files are attached in a zip file.


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]