I do this in one of our scripts using translate - I convert all numbers into
"#" for purposes of sorting and grouping:
<xsl:key name="letter-group" match="fmp:ROW"
use="translate(substring(fmp:COL[2]/fmp:DATA,1,1),'abcdefghijklmnopqrstuvwxyz1234567890','ABCDEFGHIJKLMNOPQRSTUVWXYZ##########')"
/>
Michele
From: Rick Quatro rick(_at_)rickquatro(_dot_)com
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com>
Sent: Friday, January 25, 2019 9:45 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Grouping by letters but keep symbols together
Hi,
I am creating a glossary and I want to group entries under each letter of the
alphabet. I am using this and it is working fine:
<xsl:for-each-group select="glossentry"
group-by="upper-case(substring(glossterm/text(),1,1))">
<topicref navtitle="{current-grouping-key()}" toc="no">
...
</topicref>
</xsl:for-each-group>
However, I want to group entries that start with a symbol or number all
together under one group. I am not sure what to use for the group-by attribute
so that letters are separate from each other and all of the non-letter
characters are in the same group. Any suggestions would be appreciated. Thank
you very much.
Rick
Rick Quatro
Carmen Publishing Inc.
rick(_at_)frameexpert(_dot_)com<mailto:rick(_at_)frameexpert(_dot_)com>
585-729-6746
www.frameexpert.com/store/<http://www.frameexpert.com/store/>
Save on energy and mobile at quatro.mystream.com
XSL-List info and archive<http://www.mulberrytech.com/xsl/xsl-list>
EasyUnsubscribe<http://lists.mulberrytech.com/unsub/xsl-list/1127818> (by
email<>)
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--