CR-xptr-20010911 string-range function

A)For clarity I would prefer another formulation in 5.4.2 (examples):
(I hope it's not poor English ...)

1)
   given:

   For example, the following expression returns a range that selects the
   17th occurrence of the string "Thomas Pynchon" occurring in a title
   element:

   suggestion:

   For example, the following expression returns a range that selects the
   17th of those "Thomas Pynchon" strings occurring in a title element:

2)
   given:

   As another example, the following expression returns a collapsed range
   whose points immediately precede the letter "P" (8 from the start of the
   string) in the third occurrence of the string "Thomas Pynchon" in a P
   element:

   suggestion:

   As another example, the following expression returns a collapsed range
   whose points immediately precede the letter "P" (8 from the start of the
   string) in the third of those "Thomas Pynchon" strings occurring in a P
   element:

3)
   given:

   The following expression selects the fifth exclamation mark in any text
   node in the document and the character immediately following it:

   suggestion:

   The following expression selects the fifth of those exclamation marks
   standing in some text nodes and the character immediately following it:

----------------------------------------------------------------------------

B) A little annotation on the implementation of the string-range function:

For an arbitrary range (special simple (?) cases of ranges inside a
comment-, processing instruction- , attribute- or namespace-node excluded)
not only the information about its start and end points and its string-value
must be retrievable but also for every involved character the information of
its preceding character point (and with that the information about the index
and the container text-node being involved) or a reference to this
information so that the string-range function can compute the new start and
end points of a range.


---------------------------------------------------------------------------

Have a nice day
Klaus

Received on Thursday, 17 January 2002 07:38:07 UTC