[XSL-LIST Mailing List Archive Home]
Re: [xsl] getting type information in xslt 2.0
Subject: Re: [xsl] getting type information in xslt 2.0|
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 25 Oct 2006 09:49:03 +0100
> the examples you provided will not run in the case of a function that
> has 2 or more arguments that must be sequences.
yes you need to be able to model sequences of sequences to do that.
I started to do that (see:
<xsl:variable name="q" as="element()"><f:q/></xsl:variable>
which then isn't used, but I realised it was midnight and I ought to
stop playing and go to bed so posted what I had:-)
Note that that is a locally generated element (so with a distinct
identity) rather than the global variable with empty elements used
If you model sequences of sequences by using XML element nesting then
you lose type information, another way is to model
as something like
where q' q'' and q''' are three distinct element nodes with name q (each
appearing twice in the sequence, denoting the start and end of a
Given such a structure, with a bit of effort you can handle nested
sequences, as you look at the next item, if it's not the special quote
marker then you use the item, if it is a q then you grab the sequence up
to the next (only) other item that is "is" equal to that item.