[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] Adding empty elements for alignment
Subject: Re: [xsl] Adding empty elements for alignment From: David Carlisle <davidc@xxxxxxxxx> Date: Thu, 23 Sep 2004 13:43:32 +0100 |
> Can you please explain why? because I wrote the wrong thing, and you made the correct correction. You want the column from r2 that has seq= the position in the for-each (ie the position coming from the pass over row 1) if you save that in a variable <xsl:variable name="position" select="position()"/> <xsl:value-of select="$r2/column[@seq=$position]"/> then that's exactly what you get, but if you do as I wrote (not what I had in my head) <xsl:value-of select="$r2/column[@seq=position()]"/> then position() inside a step refers to the current node list inside that step and will only select column elements who's seq attribute is equal to the sibling count so in your example it will only select the first one as after that you miss out column 2 and so every other element in that row has seq attribute larger than position(). Sorry for my mistake, and glad you fixed it yourself so quickly. David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Adding empty elements for, Kevin Bird | Thread | [xsl] setParameter(), Luke Ambrogio |
RE: [xsl] Adding empty elements for, Kevin Bird | Date | RE: [xsl] XSL Beginner Resources [w, Kienle, Steven C |
Month |