xsl-list
[Top] [All Lists]

Re: [xsl] finding position() in xpath 1.0

2007-03-19 07:02:16

  //CELL[position() = 
  
count(../following-sibling::ROW[1]/CELL[(_at_)test='yes']/preceding-sibling::CELL)]/following-sibling::CELL[1]


yes that's simpler, but I think it needs to be

//CELL[position() = 1 +
count(../following-sibling::ROW[1]/CELL[(_at_)test='yes']/preceding-sibling::CELL)]

as if the test node is a first child you want the first child (that is
position()=1) rather than the first sibling of the node with
position()=0 (as there is no such node).



David


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--