|
Subject: Re: [xsl] XSLT 2.0: Reasons for mode="#all" ? From: "andrew welch" <andrew.j.welch@xxxxxxxxx> Date: Tue, 6 Jun 2006 14:18:16 +0100 |
I was wondering if somebody could provide an example where using
mode="#all"
(http://www.w3.org/TR/xslt20/#modes)
is necessary and useful.
It seems to me that using this feature can be dangerous and harmful -- when should we recommend it?
It very useful when you apply-templates in different modes, but then need an overriding template to apply to all modes.
<xsl:apply-templates select="heading" mode="bold"/> <xsl:apply-templates select="heading" mode="italic"/>
etc, then you need to add a template to output an anchor for each heading, you can just use:
<xsl:template match="heading" mode="#all">
<a id="{@id}"/>
<xsl:next-match/>
</xsl>cheers andrew
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] XSLT 2.0: Reasons for mod, Michael Kay | Thread | [xsl] How to iterate over the outpu, cknell |
| Re: [xsl] XSLT 2.0: Reasons for mod, Dimitre Novatchev | Date | RE: [xsl] XSLT 2.0: Reasons for mod, Michael Kay |
| Month |