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

RE: Display order issue

Subject: RE: Display order issue
From: "Joseph Tan" <Joseph.Tan@xxxxxxxxxxxxxxxxxx>
Date: Tue, 14 Oct 2003 10:53:02 -0500
joseph tan
I moved xsl:variable within xsl:for-each and it works.  

I'm still very new at these.  Thanks a lot for the explanation,
Michael.   

Joseph

>>> mhk@xxxxxxxxx Monday, October 13, 2003 11:54:06 AM >>>


> -----Original Message-----
> From: Joseph Tan [mailto:Joseph.Tan@xxxxxxxxxxxxxxxxxx] 
> Sent: 13 October 2003 17:20
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx; mhk@xxxxxxxxx 
> Subject: RE:  Display order issue
> 
> 
> GREAT!  This works.  I manage to get the display order I want 
> but I have problem getting the URL (B3) to link correctly.
> 
> Please take a  look at this and let me know what I did wrongly.
> 
> <xsl:variable name="url" select="../B3[number(current())]"/>
> <xsl:for-each select="B7">
>   <xsl:value-of select="../B2[number(current())]"/>
>   <xsl:text> (</xsl:text><a href="{$url}">Full-Text</a>     
>   <xsl:text>)</xsl:text>
>   <xsl:if test="position()!=last()">
> 	<xsl:text>, </xsl:text>
>    </xsl:if>	
> </xsl:for-each>
> 

Another case where I regret posting code. Do try to understand how it
works before you use it or extend it. If you don't understand it,
please
ask for an explanation.

The xsl:for-each over the B7 elements sets the context node to each B7
element in turn, it then selects the B2 element whose position is
equal
to the content of that B7 element. Why do you imagine that selecting a
B3 element outside this for-each is going to do anything useful?

Michael Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.