[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Adding empty elements for alignment

Subject: Re: Adding empty elements for alignment
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 23 Sep 2004 13:43:32 +0100
xsl for every
> 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.


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:

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.