xsl-list
[Top] [All Lists]

Re: [xsl] Re: OOXML

2008-07-01 10:52:45
That link was to a discussion on transitive closures (a property of graphs),
not the closures I was talking about
[http://en.wikipedia.org/wiki/Closure_(computer_science)].  Not so much OO
as one way to implement OO.



But *that* kind of closure has also been implemented and around for a
long time.

Any partial application of

  foo(x1,x2,..., xN)

over its first N - k arguments "is a function that is evaluated in an
environment containing one or more bound variables" -- in this case N
- k bound variables.

This was first made available for XSLT 1.0 in FXSL 1.x in 2002  here:

   http://fxsl.sourceforge.net/articles/PartialApps/Partial%20Applications.html


The same approach, but implemented using the much higher expressive
power of XSLT 2.0 (using the <xsl:function> instruction) was
implemented around 2004 in FXSL 2.0 and is discussed here:

   
http://www.idealliance.org/papers/extreme/proceedings/xslfo-pdf/2006/Novatchev01/EML2006Novatchev01.pdf

To summarize, we have had closures (as defined at
[http://en.wikipedia.org/wiki/Closure_(computer_science)]) in XSLT for
many years.


-- 
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play



On Tue, Jul 1, 2008 at 3:37 AM, Deborah Pickett
<debbiep-list-xsl(_at_)futzle(_dot_)com> wrote:
Dimitre Novatchev wrote:

Case in point: I don't consider XSLT to be functional because of the
hoops
you have to go through to get something resembling lambda functions.
 [...]

Not exactly lambda-functions, but various ways of creating dynamically
new functions are well-known and have been supported with FXSL for
years:

[snip]

Yes, those hoops are the ones I was talking about.

Closures are something I'd be curious to see done in XSLT, though I still
have never come across a programming problem in real life that was  best
solved by using them.

Has been done for quite some time; see:
   http://dnovatchev.spaces.live.com/blog/cns!44B0A32C2CCF7488!384.entry

That link was to a discussion on transitive closures (a property of graphs),
not the closures I was talking about
[http://en.wikipedia.org/wiki/Closure_(computer_science)].  Not so much OO
as one way to implement OO.


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>