Subject: RE: xsl:function vs named templates (Which is better?)
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 14 Mar 2007 22:04:14 -0000
|
> So I have a fairly general question. I am using XSLT 2.0 and
> am interested in creating user defined functions. Which
> construct is better to use... xsl:function or a named template?
I tend to use functions when the purpose is to compute a value that the
program wants to make use of, and templates when the purpose is to write
data to the result document. In practice I use named templates very rarely
with XSLT 2.0.
Michael Kay
http://www.saxonica.com/
|