W3C home > Mailing lists > Public > uri@w3.org > April 2002

RE: Possible Problems with an URI scheme?

From: Joshua Allen <joshuaa@microsoft.com>
Date: Mon, 22 Apr 2002 22:19:49 -0700
Message-ID: <4F4182C71C1FDD4BA0937A7EB7B8B4C104F0565F@red-msg-08.redmond.corp.microsoft.com>
To: <jimbofc@yahoo.com>, <uri@w3.org>
Why not use XPath to traverse the children positionally?  This is very
simple syntax -- for example, the <child4> element in your paper would


or in XPath:


or in abbreviated XPointer syntax:


Now, if you look more closely, you will notice that your exa: syntax has
some redundant information.  Doesn't it seem interesting that the second
path segment is prefixed by 2, the third by 3, and so on?  I bet you
will find that the LN number always starts at two and increments by one.
So let's take a look at your syntax with the redundant data removed:


Hmm, this is very interesting.  One slight thing we could do for
consistency's sake could be to do something about the ROOT syntax.
Since the root element will *always* have a LN of 1 and a SN of 1, the
syntax would be (putting back in the redundant information):


Now let's take out the redundant information like we did before:


Oops!  That is the exact same syntax as XPointer.  Now let's suppose we
are worried about what would happen if someone got confused and thought
the *name* of an element was "3" instead of the position.  We could make
it absolutely clear that we are referring to position instead of name by
using the position syntax of XPath:



Joshua Allen
Microsoft WebData XML

> -----Original Message-----
> From: Jimmy Cerra [mailto:jimbofc@yahoo.com]
> Sent: Monday, April 22, 2002 4:32 PM
> To: uri@w3.org
> Hi all.
> I'm writing a MathML-Presentation processor in JavaScript, and I
needed a
> way to
> transverse the document tree.  Xpath is too complicated (at least for
> and my
> little project), so I devised a location-path for each element in the
> document in the form as a URI.
> The details can be found here: http://www.pitt.edu/~jfcst24/exa-RD.txt
> only
> intend to use this for my projects involving the processor that I
> (Xparse.js).  Still, it is useful to have a specific reference to
> to;
> hence the reason I wrote this.
> What problems do you see with this scheme?
> ---
> Jimmy Cerra
Received on Tuesday, 23 April 2002 01:20:35 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:19:03 UTC