Balaji Loganathan wrote:
Hi,
  Is there is any best practice for coding the XSL:FO,
    that is always
    1. use xsl:template
    2. check whether the element exist or not even for
mandatory elements.
  My xsl is of 578 lines,Suddenly i felt that my code
is not object oriented beacuse no where i have used
  xsl:template.
  I construct the PDF line after line.Does this affect
the processing speed.
  Does using xsl:template increases the processing
speed.
  Please comment.

For a start, you should be aware that you actually ask for coding XSLT, not XSLFO. They aren't the same things at all, even though they are usually used toghether.

Another hint: using xsl:template has nothing to do with
object orientation. XSLT is mainly a declarative language,
the concept of object orientatitation is only relevant
for advanced topics. However, using xsl:template usually
makes transformations more robust, flexible, modular and
easier to maintain.

Regarding performance, using xsl:template will not improve
processing speed. It will be slightly slower due to matching
overhead, however, processors are specifically optimized for
doing this, so there is no measurable performance loss from
using xsl:template unless you have literally thousands of
templates or hundreds of very badly designed templates.

J.Pietschmann







Reply via email to