Re: [xsl] [xslt 2.0] Difference betwen functions and templates

Subject: Re: [xsl] [xslt 2.0] Difference betwen functions and templates
From: Florent Georges <darkman_spam@xxxxxxxx>
Date: Mon, 23 Jul 2007 17:00:59 +0200 (CEST)
Justin Johansson wrote:

  Hi

> Has is also be explained in this thread already that another
> difference is that xsl:functions do not receive any initial
> focus?

  The context node is cleared when a function is called.  Other context
component that are affected by a call to a stylesheet function are:

    - current template rule (cleared)
    - current mode (cleared)
    - current group and grouping key (cleared)
    - current captured substrings (cleared)
    - output state (set to temporary output)

  The two first are related to applying template rules from within a
funciton (apply imports, next match, or in current mode).  The third
one is related to accessing grouping info from with a function called
from within xsl:for-each-group (the current group and grouping key are
not accessible from the context).  Same thing for the captured
substrings within an xsl:analyze-string.  And the last one is important
when writing to result document for instance (I don't know the other
implications of the output state).

  See http://www.w3.org/TR/xslt20/#additional-dynamic-context.

  Regards,

--drkm






















      _____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 

Current Thread