RE: [xsl] xsl:script: functions written in XSLT

Subject: RE: [xsl] xsl:script: functions written in XSLT
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Wed, 10 Jan 2001 10:03:30 -0000
> I was wondering about this when I first saw saxon:function : 
> Is there really
> any difference between that and named templates? If not, then 
> why do we need both? 
>
Yes, that worried me too before I introduced saxon:function; my first
thought was to allow some kind of mapping of an XPath function call to a
named template. I came to the conclusion that a named template is a
specialised kind of function whose syntax is designed on the assumption that
its purpose is to construct a tree, and that bending this syntax to allow it
to return other kinds of value would be very messy.

The "two language" approach, XSLT+XPath, with the two languages having very
different syntactic and semantic conventions, is always going to lead to
some boundary problems where the two meet.

Mike Kay

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


Current Thread