This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Re: Re: An issue with XPath 2.0 sequences (Was Re: RE: Muenchian method, and keys 'n stuff)
- From: David Carlisle <davidc at nag dot co dot uk>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Sat, 2 Feb 2002 12:06:39 GMT
- Subject: Re: [xsl] Re: Re: An issue with XPath 2.0 sequences (Was Re: RE: Muenchian method, and keys 'n stuff)
- References: <000701c1ab56$d78a8080$78fe0250@pcukmka>
- Reply-to: xsl-list at lists dot mulberrytech dot com
> I'm puzzled why you should say that, because I've never seen anyone complain
> that when you do book/chapter/para you get back a "flat" list of <para>
> elements rather than a sequence of sequences of sequences.
Xpath as used in (unextended) XSLT 1 is a one-way street, you select
nodes from the source, and you do something with them and construct some
result tree, and that basically is the end of the road.
This has always been seen as a major limitation, and in XSLT2 there is
much more emphasis on being able to reuse results of expressions,
this is a good thing. However XSLT is, if it fits into any kind of box
at all, a declarative functional programming language (just lacking a
few features like functions as first class objects:-) If one looks to
any such language to see how one programs in a side effect free way
(pure variants of lisp, SML, haskell, miranda, ...) then one finds that
iterating over lists is just about the most common and fundamental
paradigm, however it will be virtually impossible to port any of these
standard programming techniques to XSLT as the list mechanism is so
bizarre. One can do it (as Dimitre has shown in XSLT 1) by faking
everything with node sequences, but that means that the sequence
possibilities added in Xpath2 are not being used at all, and will mean
as you have commented before a lot of overhead in generating things with
identity when that isn't really needed.
David
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list