- From: Daniel Veillard <daniel@veillard.com>
- Date: Thu, 1 Nov 2001 12:05:44 +0100
- To: Elliotte Rusty Harold <elharo@metalab.unc.edu>
- Cc: www-xml-linking-comments@w3.org
On Wed, Oct 31, 2001 at 11:54:03AM -0500, Elliotte Rusty Harold wrote: > The string-range() function is underspecified in several ways in the > XPointer CR. First of all, it is unclear what happens when there are > overlapping matches; e.g. I try to match "ABA" in the string > "ABABABABABABA". The spec says, "Each non-overlapping match can > contribute a range to the resulting location set. " It doe snot says > that each non-overlapping range *does* contribute a range to the > resulting location set. I think it's implicit, should be explicit if not. My implementation returns 6 ranges. > Furthermore it does not say that overlapping > ranges do not contribute such ranges. Finally, given a group of > overlapping matches it does not provide any hints as to how to select > the correct matches. I think the intent was that if 2 ranges A and B could be extracted and that A is a subrange of B, the evaluation should only return B. I base this on the the linking purpose, there is no need for example to separate the 2 anchors of a given link if both are contained in the same range. Of course extending this argument to the example provided would maybe lead to return a single range containing the full "ABABABABABABA" string. This would be more complex and possibly counter-intuitive since for a lot of simple string matching patterns you would expect the returned ranges to be of the size of the match. Daniel -- Daniel Veillard | Red Hat Network http://redhat.com/products/network/ veillard@redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
Received on Thursday, 1 November 2001 06:05:50 UTC