|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] position()
Hi,
I have the following xml structure:
<USERS>
<USER>bunch of attributes</USER>
<USER>bunch of attributes</USER>
<USER>bunch of attributes</USER>
</USERS>
I want to display the first user in a different way from the others.
So, here is what I tried to do:
<xsl:value-of select="//USERS/USER[1]/*[name()=$tagName]"/>
here $tagName is the attribute I want to display. This works fine.
Then somewhere else, I try the following:
<xsl:for-each select="//USERS/USER[position() > 1]">
This returns nothing. I am using the XSL:P processor to combine the xml
and xsl into html. I have seen people mention problems using >, so I
also tried
<xsl:for-each select="//USERS/USER[not(position()=1)]">
Same result. The weird thing is that when I use this:
<xsl:value-of select="count(//USERS/USER[position()=1])/>
or
<xsl:value-of select="count(//USERS/USER[position()=last()])/>
the returned value is 3. but when I try position=2 or 3, the returned
value is 0. Any hints??
Thanks,
Natalie
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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








