Anyhow, having to parse for nested sequences seems weird.
Blame the WG for specifying xpath2 lists as self flattening:-)
If you don't like the <q/> method (which I've never actually used, I
just made up while sketching out the code in this thread) there is an
alternative method that I do use in xq2xsl where I need to model XQuery
"order by" whose semantics are based on "tuples" ie lists of lists.
There I model things by having a single sequence containing all the data
and then model a list of lists as a list of strings. You apply
string-to-codepoints() to a string and that gives you a list of
integers, which you use as indexes into the sequence of data (actually
you have to offset the indices by 32 to avoid the 0-32 codepoint range
which you can't have in a string.)
see http://monet.nag.co.uk/xq2xml/xq2xslnotes.html#s5
Also, this approach sacrifices static type checking,
Yes, I think if you need to check types then you can't really avoid the
subject line of this thread any longer: You need to be able to access
the type information:-)
David
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--