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

RE: how to match true and false and display yes and no

Subject: RE: how to match true and false and display yes and no instead?
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 27 Jul 2005 23:03:54 +0100
RE:  how to match true and false and display yes and no
> Michael Kay, you say this:
> 
> <xsl:template 
> match="members/profile/married[.='false']">no</xsl:template>
> <xsl:template 
> match="members/profile/married[.='true']">yes</xsl:template>
> 
> is another way of doing it. Now there are two templates. I have used
> <xsl:if> Is templates faster (better) than <xsl:if> ? Or are there
> other arguments for using this instead, then I'll change my code.
> 

I don't think I can come up with strong reasons why one of these styles is
preferable to the other. I quite like structuring my code as a large number
of simple rules rather than a smaller number of more complex rules, but it's
a matter of personal style. It's unlikely to make much performance
difference - but that of course depends on the XSLT processor you are using
(and the advantage could be either way).

Michael Kay
http://www.saxonica.com/

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.