W3C home > Mailing lists > Public > www-forms@w3.org > July 2005

Delete nodeset index evaluation

From: Erik Bruchez <erik@bruchez.org>
Date: Fri, 08 Jul 2005 16:58:52 +0200
Message-ID: <42CE94AC.3010009@bruchez.org>
To: www-forms@w3.org

All,

The 1.0 spec says under "9.3.6 The delete Element": "The n-th element
node is deleted from the instance data, where n represents the number
returned from node-set index evaluation, defined in 9.3.5 The insert
Element."

This is not very accurate: does "node-set index evaluation" mean all
the steps defined under "9.3.5", i.e.:

   "The rules for selecting the index are as follows:

      1. The return value of the XPath expression in attribute at is
         processed according to the rules of the XPath function
         round(). For example, the literal 1.5 becomes 2, and the
         literal 'string' becomes NaN.

      2. If the result is NaN, the insert appends to the end of the
         node-set.

      3. If the resulting index is outside the valid range of the
         node-set, it is replaced with either 1 or the size of the
         node-set, whichever is closer."

I would assume so. But then if the resulting index can never be out of
range, because it is replaced with either 1 or the size of the
node-set, whichever is closer.", and of course if the nodeset is empty
nothing happens, how can the following ever be possible:

   "If no nth node exists, the operation has no effect."

And if my interpretation here is incorrect, then what does "node-set
index evaluation, defined in 9.3.5" mean?

-Erik
Received on Friday, 8 July 2005 14:59:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:01 GMT