This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: xsl:script: functions written in XSLT
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] xsl:script: functions written in XSLT
- From: Kay Michael <Michael dot Kay at icl dot com>
- Date: Wed, 10 Jan 2001 10:03:30 -0000
- Reply-To: xsl-list at lists dot mulberrytech dot com
> 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