W3C home > Mailing lists > Public > www-xml-linking-comments@w3.org > January to March 2002

XPointer CR: zero-based indexing

From: John E. Simpson <simpson@polaris.net>
Date: Sat, 19 Jan 2002 13:10:58 -0500 (EST)
Message-Id: <5.0.2.1.2.20020119130331.023fadb0@mail.polaris.net>
To: www-xml-linking-comments@w3.org
What is the intention of using zero-based numbering to index points, 
particularly vis-a-vis XPath position()? For instance, does the following 
locate the first point in a document (or external parsed entity)?

    xpointer(//point()[1])

Or must you do:

    xpointer(//point()[0])

If the former, zero-basing the indexes of points seems academic. The 
latter, OTOH, seems to redefine XPath positions.

What am I missing?

=======================================================================
John E. Simpson        | "I don't have to walk my dog anymore. I walked
http://www.flixml.org  | him all at once." (Steven Wright)
XML Q&A: www.xml.com   |
Received on Monday, 21 January 2002 12:53:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 October 2009 08:39:43 GMT