Re: [xsl] xml to xml issue in XSLT2.0

Subject: Re: [xsl] xml to xml issue in XSLT2.0
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Tue, 20 Nov 2007 10:12:20 +0000
On 19/11/2007, G. Ken Holman <gkholman@xxxxxxxxxxxxxxxxxxxx> wrote:
> As I read section 14.2, the current grouping key is an atomic value,
> so I've created an atomic value from the two items in such a way that
> they are delimited by a character unlikely to show up in either
> value.  The carriage returns in line-ending sequences are normalized
> to linefeed characters, so the only carriage return to survive would
> be one coded as a numeric character reference in your source, which
> is quite unlikely.
>      <xsl:for-each-group select="tab/sub"
>                          group-by="concat(../@name,'&#xd;',@name)">

Hi Ken,

Do you need to worry about the delimeter here?  Just using:

concat(../@name, @name)

should be fine for the grouping key - not need to worry about whether
a delimeter, if used, occurs in any of the values.

There's no harm in using a delimiter to make it look nicer for
debugging, but there's no restrictions on what you use.

(if I've got that right :)

Andrew Welch

Current Thread