|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: problems with position() and following-sibling
Thanks for your reply Prakash, but it does not work; especially footnote
is not processed conditionally...
Nevertheless, you made me think of using the axis specifier parent:: which makes things clearer when it comes to test the existence of cell 7 (in my previous post, I omitted namespace prefix "e" to make the example more readable). <xsl:template match="e:Cell[position() > 1 and position() < 7]"> <xsl:message>* current pos <xsl:value-of select="position()"/> *</xsl:message> <entry> <xsl:value-of select="e:Data"/> <xsl:if test="position()=6 and parent::e:Row/e:Cell[7]"> <xsl:message>+++ making footnote at pos <xsl:value-of select="position()"/> +++</xsl:message> <footnote><para><xsl:value-of select="parent::e:Row/e:Cell[7]/e:Data"/></para></footnote> </xsl:if> </entry> </xsl:template> I was still hunting the cause, why the test for position 3 didn't work and introduced some debug messages as shown above. Surprisingly, I got the following output in my log (in case the stylesheet hits cell 7): * current pos 4 * * current pos 6 * +++ making footnote at pos 6 +++ * current pos 8 * * current pos 10 * * current pos 12 * Where does the doubling of the position number come from? No wonder my attempt for testing node number 3 (also in the way I tried it in my previous post with following-sibling) had no chance to work. The values of current position (in my example) are a complete mystery to me. Any further explanation is very welcome! Georges omprakash.v@xxxxxxxxxxxxx schrieb:
-- -------------------------------------- Georges Schmitz Projektleitung ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tel: 09131 / 877-176 Fax: 09131 / 877-136 Mob: 0163 / 877 1623 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEITEC AG Werner-von-Siemens-Str. 61 91052 Erlangen --------------------------------------
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








