xsl-list
[Top] [All Lists]

RE: mixed content nodes question

2005-01-07 12:32:59


From: Antonio Mota [mailto:amsmota(_at_)gmail(_dot_)com]

Or to one who doesn't like if's

        <xsl:template match="dictionary[lookup = '3']>Foo<xsl:/template>
        <xsl:template match="dictionary[lookup = '4']>Foo<xsl:/template>

You mean, "@lookup = '3'" :-).

Anyway, here IMHO it's better to _factor_ the match on the <dictionary> node
out into an outer template, then you have a bunch of ifs that only have to
know about the @lookup.  Easier on the eyes, and maybe looselier(?)-coupled
:-) to the document structure...

Cheers,
Mark


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--