|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Wierd IE5B2
>
>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
|
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








