?
=?iso-8859-1?q?Jean-Fran=E7ois_Michaud?=
Who in the name of #%@! thought this one out??
I noticed this behavior when trying to debug a problem I was having.
I used this logical expression and some XPATH in a specific sequence of
instructions that allow me to transform a CALS table model into our own
specific table model and I used this expression:
<xsl:if test="self::node()=../CELL[1] and self::node()[@colname >
1]">...
to artificially create cells at the beginning of the row if their
colname is greater than 1. The algorithm works fine, but the expression
DID NOT in every case.
.../CELL[1] actually refers to the content of CELL[1] instead of
refering to a unique identifier specific to the first child of the
parent. Who?!?! What??!?. Shouldn't the XPATH expression point to
unique cells within the XML tree as opposed to outputting the content?
A freak case emerged when of course, 2 different cells within the same
row had exactly the same content. I had to patch up the logical
condition so that it would uniquely identify the cells.
Shouldn't the distinction be made between the node itself and its
content? Or am I missing something?
Regards
Jean-Francois Michaud
I noticed this behavior when trying to debug a problem I was having.
I used this logical expression and some XPATH in a specific sequence of
instructions that allow me to transform a CALS table model into our own
specific table model and I used this expression:
<xsl:if test="self::node()=../CELL[1] and self::node()[@colname >
1]">...
to artificially create cells at the beginning of the row if their
colname is greater than 1. The algorithm works fine, but the expression
DID NOT in every case.
.../CELL[1] actually refers to the content of CELL[1] instead of
refering to a unique identifier specific to the first child of the
parent. Who?!?! What??!?. Shouldn't the XPATH expression point to
unique cells within the XML tree as opposed to outputting the content?
A freak case emerged when of course, 2 different cells within the same
row had exactly the same content. I had to patch up the logical
condition so that it would uniquely identify the cells.
Shouldn't the distinction be made between the node itself and its
content? Or am I missing something?
Regards
Jean-Francois Michaud