Re: Adding empty elements for alignment
> 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 ________________________________________________________________________
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