xsl-list
[Top] [All Lists]

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

2007-11-20 03:12:56
On 19/11/2007, G. Ken Holman <gkholman(_at_)cranesoftwrights(_dot_)com> 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.
[snip]
     <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
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

--~------------------------------------------------------------------
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>
--~--