[Home] [By Thread] [By Date] [Recent Entries]

Subject: Re: Group by optimism
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 13 Feb 2026 17:51:32 -0000
On 13/02/2026 18:27, rick@xxxxxxxxxxxxxx wrote:
I have it working, but curious if there is a way to optimize the code
or make it more readable.


As for readability, I would prefer

B select="case"

to

B B select="child::case"

but I am pretty sure others have different preferences.


The


group-by="matches(upper-case(substring(normalize-space(caseName/.), 1,
1)),'^[A-Z]')"

seems to use substring to select the first character after white space
normalization, then in the regular expression ^ to match from the start,
it seems

B B group-by="matches(normalize-space(caseName), '^[a-z]', 'i')"

would do the same, i.e. check that the first character in caseName after
white space normalization is an ASCII letter.

But again, the shorter expression might appear easier to read by an
outsider while the longer expression might just express how you thought
about selecting the value for the group by.

Current Thread
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member