Re: [exsl] Naming exsl:return/exsl:result (Was: Re: [xsl] Functional programming in XSLT)

Subject: Re: [exsl] Naming exsl:return/exsl:result (Was: Re: [xsl] Functional programming in XSLT)
From: "Lassi A. Tuura" <lat@xxxxxx>
Date: Tue, 20 Mar 2001 14:43:34 +0100
I wrote:
> When the RTF concept is removed, would it not be possible to say that
> xsl:value-of just returns the original node set instead of a copy?

And that was of course me being forgetful.  I was thinking of
xsl:copy-of, whose name seems inappropriate for overloading (I do make
that mistake often).  IMHO an unfortunate choice of wordings in the
first place :-(

Given this I would vote for an addition of a generic primitive that
operates with the original node list (= by reference) rather than
copying it as xsl:copy-of does -- and then deprecate xsl:copy-of.  I
suppose one could just change the xsl:copy-of semantics, but then the
name IMO is confusing, as the result might or might not involve copying
depending on the context.

At any rate such a new primitive should be available in all contexts;
returning values from functions would be a natural extension.  Other
uses could include a xsl:variable whose value is a node list with
references to the original nodes (not copies).  This is for situations
when the variable computation is complex enough that it cannot be
written as a simple `select' attribute and has to written as a
template.  Currently we have no other choices but to make a RTF and then
use node-set(), but then the nodes are no longer the same they were in
the original document(s).

Cheers,
//lat
-- 
No the Real Programmer wants a "you asked for it, you got it" text
editor -- complicated, cryptic, powerful, unforgiving, dangerous.
TECO, to be precise.  --Ed Post, "Real Programmers Don't Use Pascal"

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


Current Thread