Re: [xsl] grouping problem

Subject: Re: [xsl] grouping problem
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Fri, 02 Apr 2010 14:07:31 +0200
Michael Ludwig wrote:
Martin Honnen schrieb am 02.04.2010 um 12:06:46 (+0200):

<xsl:for-each-group select="*" group-adjacent="self::ueberschrift or self::absatz[matches(., 'I+\.')]">
<xsl:choose>
<xsl:when test="current-grouping-key()">
<xsl:copy-of select="current-group()"/>
</xsl:when>
<xsl:otherwise>
[...]

It took me a while to understand this. I find it really clever!

The matching of the roman number needs improvement I think, based on
http://markmail.org/message/tw36hslmzf6fxw6w
it could be changed to
self::absatz[matches(., '^M*(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})\.$')]



--


	Martin Honnen
	http://msmvps.com/blogs/martin_honnen/

Current Thread