xsl-list
[Top] [All Lists]

Re: calling templates depending on content

2004-10-30 01:16:19
> <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