XPointer WD comments

Lars Marius Garshol larsga at ifi.uio.no
Tue Aug 25 15:50:26 BST 1998


I've just returned to my XPointer implementation and updated it,
adding support for more of the specification. Because of this I have
some new questions and reflections on the draft:

 - The definition of the term 'resource' in section 1.3 seems to me
   both circular with 'locator' and also rather unclear.

 - The WD says nothing whatever about what kinds of errors exist and
   what to do with them. To me it seems sensible to operate with three
   kinds of errors: 

     - syntactic ones, where the locator fails to conform to the
       grammar
     - semantic ones, where the locator does not make sense, such as
       root().child(1,#comment).attr(id)
     - simple failures, where the locator attempts to locate
       non-existent nodes, such as child(4) on an element with three
       child elements

 - The WD does not say anything about how to interpret locator terms 
   using nodes located with the 'string', 'attr' or 'span' keywords as
   the source of a locator. Ie: what is the child(1) of a span?

 - Similarly, nothing is said about how to continue locating from a
   list of candidate nodes, such as in root().child(all).child(1)

 - According to the WD, a 'string' location term can locate a string
   that stretches across several different nodes. This seems to me
   both difficult to implement and somewhat unecessary, since as far
   as I can see the same could be achieved by use of the 'span' term.

 - Maybe a non-normative appendix to the spec should add something
   about how to represent 'span' results in terms of the DOM? Should
   one use a nodelist or a new node class?

 - Does the A.2 section indicate that a future version of the XPointer
   spec will include a formal description of XPointer semantics in
   terms of the DOM?

 - Nothing whatever is said about the data model on which XPointers
   operate, which means that issues like entity handling and attribute
   defaulting are not covered. For instance, would the XPointer 
   string("lars") match anywhere in the following instance?

   <!DOCTYPE ex [
     <!ENTITY a "a">
   ]>

   <ex>l&a;rs</ex>

--Lars M.


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list