
July 20th, 2005, 09:40 AM
| | | What does this do: <xsl:apply-templates select="." />
What does this do: <xsl:apply-templates select="." /> ? | 
July 20th, 2005, 09:40 AM
| | | Re: What does this do: <xsl:apply-templates select="." />
KJ wrote:
[color=blue]
>What does this do: <xsl:apply-templates select="." /> ?
>
>
>[/color]
Applies the best matching template for the current context node.
Unless inside a for-each, it will cause infinite recursion...
Soren | 
July 20th, 2005, 09:40 AM
| | | Re: What does this do: <xsl:apply-templates select="." />
If inside a template, such as:
<xsl:template match="para" mode="note">
<xsl:apply-templates select="." /><br />
</xsl:template>
Then does it only match para's inside notes? Or does it match para's
children also, or what? I didn't write this, only trying to understand
someone else's code. | 
July 20th, 2005, 09:40 AM
| | | Re: What does this do: <xsl:apply-templates select="." />
"KJ" <n_o_s_p_a__m@mail.com> wrote in message
news:1117228956.799253.270520@g44g2000cwa.googlegr oups.com...[color=blue]
> If inside a template, such as:
>
> <xsl:template match="para" mode="note">
> <xsl:apply-templates select="." /><br />
> </xsl:template>
>
> Then does it only match para's inside notes?[/color]
No, this template will only be selected for processing of a "para" element
if the corresponding xsl:apply-templates had its "mode" attribute set to
"note".
Once selected for processing it delegates this processing to the "normal"
template (without mode specified), that matches a "para".
This code may have been written when the author realised the need for a
special mode of processing "para"s but didn't have time to fully implement
it and as a first step just wrote the moded template as a wrapper of the
normal template.
Or such a template may include the normal processing and also do something
in addition (not shown in the above code) both before or after the normal
processing.
[color=blue]
> Or does it match para's
> children also,[/color]
No.
Cheers,
Dimitre Novatchev
[color=blue]
> or what? I didn't write this, only trying to understand
> someone else's code.[/color] | 
July 20th, 2005, 09:40 AM
| | | Re: What does this do: <xsl:apply-templates select="." />
So the <xsl:apply-templates select="." /> part of the block does the
delegation of processing to the "normal" template (without mode
specified) then? | 
July 20th, 2005, 09:40 AM
| | | Re: What does this do: <xsl:apply-templates select="." />
"KJ" <n_o_s_p_a__m@mail.com> wrote in message
news:1117252295.757979.59550@o13g2000cwo.googlegro ups.com...[color=blue]
> So the <xsl:apply-templates select="." /> part of the block does the
> delegation of processing to the "normal" template (without mode
> specified) then?[/color]
Yes | 
July 20th, 2005, 09:40 AM
| | | Re: What does this do: <xsl:apply-templates select="." />
thanks so much to all |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | | | What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over network members.
|