Re: implementors question: correct behavior of nested nodeset in repeat

Joern,

> Just consider the case that the author want to insert an item at
> position 4 in the nodeset. Will it be a child of level[1] or of level[2]?

I would suggest that it's best if it's always level[2]. My logic is
that there is no such thing as 'insert a new node at position 4', but
rather, it's a two-stage process where first, the index gives you a
node that the insertion will be _relative_ to, and only then is the
new node inserted based on @position.

So if in your example you have an index of '4', that gives us a node
with level[2] as the parent. The next step is then simply to insert
the new node either before or after level[2]/item[1], i.e., always in
the second group of nodes.

Regards,

Mark

-- 
  Mark Birbeck, formsPlayer

  mark.birbeck@x-port.net | +44 (0) 20 7689 9232
  http://www.formsPlayer.com | http://internet-apps.blogspot.com

  standards. innovation.

Received on Tuesday, 27 February 2007 23:16:57 UTC