Re: Reference and First-Class Function

Dimitre Novatchev <[email protected]> Sun, 21 Dec 2008 08:05:52 -0800 (PST)
Newsgroups gmane.text.xml.xslt.extensions
Message-ID <[email protected]>
Vladimir,


> > So, references do exist in XPath and XSLT, they are held in a
> > variables and returned from functions. The only problem is
> > whenever we want to store them in an XML document or use a
> > reference to a sequence as an atomic item inside another sequence.
> =

> An atomic item referencing a sequence inside another sequence
> does not exist in the current specs.

Neither does a reference to a node. However both=A0 are actualy used in any=
 XSLT transformation.

Whenever an argument to a function is a sequence, what is actually passed t=
o the function is a reference to that sequence (the sequence is not copied).

References, either to nodes or to sequences, do exist in XSLT and everybody=
 uses them.


> =

> On the other hand I do not like the idea of ex:partial-apply(), as it's
> defined in John's proposal, as it resembles reflection very much.

EXSLT is not a place to comment on such a proposal -- its proper destinatio=
n is W3C. Therefore I will not comment on it.


> =

> In absence of inline functions I'd based implementation of references (an=
d maps) =

> on external objects.

Yes, I think this is a sound and logical way to go.

=A0
Cheers,
Dimitre


      =