RE: [xsl] xslt style

Subject: RE: [xsl] xslt style
From: David.Pawson@xxxxxxxxxxx
Date: Fri, 10 Jan 2003 11:27:04 -0000
Jeni wrote:
>.... personally, I think
> that the only time you should use named templates is when the context
> node, position and size has no influence on the result of the template
> -- in other words when it's a pure function that computes its results
> based purely on the parameters that are passed to it. Otherwise, my
> preference is to use moded matching templates.

I'm rather curious about the logic behind this Jeni.
I can see the advantage of this class of use, in that it could then 
be used anywhere, in any stylesheet. Is that the rationale?

Your option of using moded matching templates I'm less clear on.
Lets say I have a named template that performs some function,
then uses the parent of the current node for something; is this
the use-case for the moded template?  
 It appears different from the 'I want only to have to write this code once'
rationale. 

I think this is another one to add to the debugging section.
Thanks Jeni.

Regards DaveP.


*** snip here ***

- 

NOTICE: The information contained in this email and any attachments is 
confidential and may be legally privileged. If you are not the 
intended recipient you are hereby notified that you must not use, 
disclose, distribute, copy, print or rely on this email's content. If 
you are not the intended recipient, please notify the sender 
immediately and then delete the email and any attachments from your 
system.

RNIB has made strenuous efforts to ensure that emails and any 
attachments generated by its staff are free from viruses. However, it 
cannot accept any responsibility for any viruses which are 
transmitted. We therefore recommend you scan all attachments.

Please note that the statements and views expressed in this email 
and any attachments are those of the author and do not necessarily 
represent those of RNIB.

RNIB Registered Charity Number: 226227

Website: http://www.rnib.org.uk 

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread