Subject: RE: [xsl] 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 |
> 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] how to match true and fal, Christian Rasmussen | Thread | RE: [xsl] how to match true and fal, JBryant |
[xsl] go from double to integer OR , Christian Rasmussen | Date | [xsl] rowspan - colspan, cookie king |
Month |