xsl-list
[Top] [All Lists]

Re: Re: A proposal:xsl:result-document asynchronous attribute

2003-03-11 12:32:17
Date: Tue, 11 Mar 2003 18:33:50 +0000
From: Francis Norton <francis(_at_)redrice(_dot_)com>
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Re: A proposal:xsl:result-document asynchronous attribute

Hi Jeni,

Jeni Tennison wrote:

Note that a side-effect-free version of timestamp is available in
XPath 2.0: current-dateTime(). During the course of a single
transformation, current-dateTime() will always return the same
dateTime.


Useful and elegant. But useful enough?

I wonder what we can do about random number generation. I think that
having a function like random(seed?) would be possible, with it
returning the same random number for a given seed. That would allow
you to do:

 <xsl:for-each select="foo">
   <xsl:sort select="random(position())" data-type="number" />
   ...
 </xsl:for-each>

to get the <foo> elements in a random order, which would seem to be
the most frequent requirement for a random() function.

Equally elegant.

I don't know. I want an XML solution for dealing with a world which is
full of XML resources all buzzing with state. Maybe the XSLT model
really isn't up to it and we shouldn't risk breaking it in the process.

I'm off on holiday tomorrow or a week, maybe I'll think about it when
not incapacitated by excessive consumption of Mojitos.

Thanks for all the comments - I do appreciate the constructive and
intelligent discussion you get here!

Francis.

--
"Never mind manoeuvre, go straight at 'em." - Admiral Horatio Nelson


-- 
======================================================================
B. Tommie Usdin                        
mailto:btusdin(_at_)mulberrytech(_dot_)com
Mulberry Technologies, Inc.                http://www.mulberrytech.com   
17 West Jefferson Street                           Phone: 301/315-9631
Suite 207                                    Direct Line: 301/315-9634
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML             
 
======================================================================

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