Re: [xsl] calling templates depending on content

Subject: Re: [xsl] calling templates depending on content
From: Stefan Borchert <stefan@xxxxxxxxxxxx>
Date: Sat, 30 Oct 2004 10:16:19 +0200
> <xsl:apply-templates select="/main/template/@name"/>

Ah! Now I understand "apply-templates". You have to call it with Wendell's

> <xsl:template match="@name[.='start']">...</xsl:template>

not only with <xsl:template name=""...>.

@Michael:

> <xsl:template name="pages">
>  <xsl:apply-templates select="." mode="pages"/>
> </xsl:template>
>
> <xsl:template name="start" mode="pages"
>               match="*[/main/template/@name='start']">
>
> <xsl:template name="query" mode="pages"
>               match="*[/main/template/@name='query']">

Ok, this now makes sense to me. "mode" is to call only templates with the same mode as in apply-templates, isn't it?

thanks and greetings,

Stefan

Current Thread