This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: xsl:script: functions written in XSLT


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]