[xsl] casting sequences

Subject: [xsl] casting sequences
From: ht@xxxxxxxxxxxx (Henry S. Thompson)
Date: Wed, 07 Jan 2009 15:46:17 +0000
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have input like this:

  . . .
  <topics days="P1D P4D">
  . . .

and in order to get a sequence of dayTimeDurations, which is what I
want, I've had to write

  <xsl:variable name="days" select="tokenize(//topics/@days,' ')"/>
  <xsl:variable name="ds"
        select="(xs:dayTimeDuration($days[1]),xs:dayTimeDuration($days[2]))"/
>

This is not only tedious, it only works if I know in advance how many
days there will be, which in principle I don't.  What's the right way
to do this?  I spent rather a long time searching the documentation
without success. . .

ht
- --
       Henry S. Thompson, School of Informatics, University of Edinburgh
                         Half-time member of W3C Team
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: ht@xxxxxxxxxxxx
                       URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged
spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFJZM5JkjnJixAXWBoRAvFQAJ42q/gItDozDIIzjyMTkF9wm5fChACeJFHj
/pMc5wWWsGXOmRJO74ROgsg=
=Krd7
-----END PGP SIGNATURE-----

Current Thread