- markup (52)
- xml (7)
- xslt (21)
- atom (8)
- overlapping markup (2)
- schema (9)
- creole (4)
- xforms (1)
- pipelines (7)
- coding (2)
- dtll (1)
- genealogy (3)
- gtd (1)
- hardware (1)
- legislation (1)
- ontologies (2)
- unicode (1)
- web (24)
- google (3)
- rdf (6)
- rest (3)
- wikis (1)
- work (1)
- xpath (1)
- xquery (1)
- xtech2008 (3)
- life (26)
- children (5)
- equality (6)
- environment (4)
- gadgets (5)
- software (3)
- xlinq (2)
- conferences (7)
- xtech (6)
- blog (7)
- drupal (3)
Re: Functions or templates? My rules of thumb
Hi Jeni,
You start by comparing an xsl:function to a named template (because you say “templates have to be called using <xsl:call-template>, “).
However, further in the text you are no longer talking about calling templates with <xsl:call-template>. Instead, you describe how matching templates can be useful with <xsl:apply-templates>.
I think you are talking about two completely different things here and combining them together will be very confusing to your readers.
To be more informative and useful to the readers, I would just point out that yes, in XSLT 2.0 there really isn’t too much to reccomend about named templates, callable via <xsl:call-template>.
On the other side, matched templates, used via <xsl:apply-templates/> do remain the most powerful feature of XSLT and have their wide uses — one of them to make possible higher-order functional programming as we know it in FXSL 2.
Cheers,
Dimitre Novatchev