On 17/05/2012 18:58, Paul M wrote:
Thanks! I did check  though
8.2 Conditional Processing with xsl:choose
and even 5.7 sequence constructor
because I thought that was what was going on.

so which statement is constructing the new node, xsl:choose or xsl:when?
Neither. It's xsl:variable. The spec here isn't intuitive, but it was done that way because of the need to retain compatibility with XSLT 1.0.

also, xquery, sequence constructor (parens) do not appear to 'work' the same, sequence seems preserved?
Correct, XQuery is different in this area.

Michael Kay