[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: "Michael Kay" <mhk@xxxxxxxxx>
Date: Wed, 8 Oct 2003 22:24:41 +0100
RE:  Display order issue
<xsl:for-each select="B7">
  <xsl:value-of select="../B2[number(current())]"/>

Michael Kay

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Joseph Tan
> Sent: 08 October 2003 21:47
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Display order issue
> 
> 
> Current display:
> American journal of cardiology 
> MDConsult (Full-Text), Elsevier (Full-Text) 
> 
> Desired display:
> American journal of cardiology 
> Elsevier (Full-Text), MDConsult (Full-Text) 
>  
> XML input:
> <B1>American journal of cardiology</B1> 
> <B2>MDConsult</B2> 
> <B2>Elsevier</B2> 
> <B3>http://home.mdconsult.com</B3> 
> <B3>http://www.sciencedirect.com</B3> 
> <B7>2</B7> 
> <B7>1</B7> 
> 
> Note: The first occurance of B2 is related to the first 
> occurance of B3 (which is the URL for the text "Full-Text") 
> and B7 (the priority display order).  The second occurance of 
> B2 is related second occurance or B3 and B7...etc. 
> 
> XSL Code:
> <xsl:for-each select="$items[name()='B2']">
>      <xsl:variable name="pos" select="position()"/>
>      <xsl:variable name="url" select="following-sibling::B3[$pos]"/>
>      <xsl:value-of select="."/>
>          <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>
> 
> Any ideas how to solve this?
> 
> Thanks in advance!
> 
> Joseph
> 
>  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.