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

Re: Wierd IE5B2

Subject: Re: Wierd IE5B2
From: "Juliane Harbarth" <jhb@xxxxxxxxxxxxxx>
Date: Tue, 23 Feb 1999 11:06:24 -0000
wierd instruments
>
>Can someone please explain how each of the following
>works? (Or is meant to work)
>
>match
>select
>test
>

The following excerpt works, i.e. it arranges a 
piece of XML as 
    <instruments>
        <instrument>violin</instrument>
        <instrument>piano</instrument>
    </instruments>
into a smooth HTML table.
It partly demonstrates the use of match and select.
match="instrument[0]" tests whether it's the first
sibling. I don't know anything about "test" yet.

    	<xsl:template match="instruments">
 	 <TABLE>
 	  <xsl:for-each select="instrument">
 	   <xsl:choose>
<xsl:when match="instrument[0]">
	     <TR>
	      <TD WIDTH="150">
	       <FONT SIZE="+1">Instruments :</FONT>
	      </TD>
	      <TD>
               <xsl:value-of select="."/> 
	      </TD>
	     </TR>
	    </xsl:when>
	    <xsl:otherwise>
	     <TR>
	      <TD WIDTH="150"> </TD>
	      <TD>
               <xsl:value-of select="."/> 
	      </TD>
	     </TR> 
	    </xsl:otherwise>
	   </xsl:choose>
	  </xsl:for-each>
	 </TABLE>
    	</xsl:template>




 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.