Re: 5.4.1 range-to() very unclear; perhaps underspecified

On Wed, Oct 31, 2001 at 11:32:44AM -0500, Elliotte Rusty Harold wrote:
> Section 5.4.1 of the XPointer specification only addresses the case 
> where the expression argument of the range-to() function returns a 
> single location. It does not indicate what happens when that argument 
> returns zero locations or more than one location. The correct behavior 
> for each of these cases should be made explicit.

  Hum, right. I think previous drafts I based my implementation on
at least took part of the possibility of multiple locations being
returned, and IIRC would build as many ranges as a result. I don't
remember reading or discussing the case where the expression would
return an empty location set, my instinctive reaction would be to
not build a resulting range.

> Furthermore, section 5.3.2 states that "The start point must 
> <> not appear after the end point in 
> document order" Thus we must also ask the question what happens if the 
> end-point provided by the arugment does come after one or more of  the 
> start-points provided by the context node set? Is this an error? Do the 
> start-point and end-point switch with each other? I see nothing in the 
> CR that addresses this point.

  Hum, I though we discussed this, and if I remember correctly (but
I would not trust my memory) this should result in a sub-resource error.
However I think my implementation actually just do what you suggested and
simply swaps the start and end points.

> Section 5.4.1 seems to implicitly assume that the expression argument 
> always returns exactly one location which comes after all the 
> start-points provided by the context node set. However, this would not 
> be true in general.

  Agreed, but I'm surprized. Though XPointer is not that long I would
personally need to reread it to make any more substanciated answer :-\


Daniel Veillard      | Red Hat Network  | libxml Gnome XML XSLT toolkit | Rpmfind RPM search engine

Received on Thursday, 1 November 2001 05:52:12 UTC