[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: mapping (Was: Re: Re: . in for)

Subject: RE: mapping (Was: Re: Re: . in for)
From: naha@xxxxxxxxxx
Date: Wed, 09 Jan 2002 14:49:09 -0500 (EST)
RE: mapping (Was: Re:  Re: . in for)
Quoting Joerg Pietschmann <joerg.pietschmann@xxxxxx>:


> Another possibility is having map() take a variable number of
> arguments,
> the first is the function, all following sequences which supply the
> parameters in parallel (like in most LISP variants)
> Specifying the exact behaviour of the map function, especially for
> the cases of having sequences of different length supplied, is tedious
> but it should be possible to lift it almost literally from some LISP
> specification.

[finally something I'm qualified to comment on]

In CommonLisp mapping termincates as soon as one of the input sequences is
exhausted, so the output sequence will be as long as the shortest argument
sequence.  See


> Oh no, i just saw the problem with using QNames for passing functions:
> they are already XPath expressions for accessing nodes :-/
> Let's have a function for converting Strings which are actually QNames
> of functions to function objects, like the well known LISP 'function
> (I mean as in (mapcar (function cdr) list) ).
> This means writing
>  select="map(xf:funref('my:grumbulation'),$departments)"
> The argument of such a generic function object constructor could be
> made
> a literal for the sake of optimizations. I think however some people
> will
> consider the standard crippled if they can't read their function names
> from the source XML :-)

Would it be fair to disambiguate the QName by context?  This would impose
the constraint that one couldn't use the same QName to name both a function
and an infoset node.  Perhaps the disambiguation could be done at the
namespace level rather than at the QName level, so for a QName to name a
function it would have to be in a namespace that was declared to be one
containing function names.  This is admittedly a bit of a kludge, but a
fairly workable one, I would think.

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

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.