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

Re: Basic xsl:choose question

Subject: Re: Basic xsl:choose question
From: Antonio Fiol <fiol@xxxxxxxxxx>
Date: Mon, 17 Jun 2002 11:15:49 +0200
basic antonio
Meir wrote:

Hello list
again im trying to learn the concepts of xsl , with no much luck here ..
im trying to perform simple choose operation ,
i have this xsl ..
----------------------------------------------------------------------------
----------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:for-each select="/CdList//*">
<xsl:call-template name="print"/>
</xsl:for-each>
</xsl:template>
<xsl:template name="print">
<xsl:choose>
<xsl:when test="name()[@type='father']">
<------------------------------------here is the problem
<span style="border:'1px solid red';width:auto">
<xsl:value-of select="name()"/><xsl:text>=</xsl:text>
<xsl:value-of select="./@id"/>
</span>
</xsl:when>
<xsl:otherwise>
<span style="border:'1px solid black';width:auto">
<xsl:value-of select="name()"/><xsl:text>=</xsl:text>
<xsl:value-of select="./@id"/>
</span>
</xsl:otherwise>
</xsl:choose>
<br/>
</xsl:template>
</xsl:stylesheet>






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.