Altova Mailing List Archives>Archive Index >xsl-list Archive Home >Recent entries >Thread Prev - [xsl] for-each-group and result-document splitting to less files. [Thread Next] Re: [xsl] for-each-group and result-document splitting to less files.To: Date: 9/8/2008 12:04:00 PM On Fri, Sep 5, 2008 at 14:19, Michael Kay <mike@xxxxxxxxxxxx> wrote: >> I want to break it into 5 files for punctuation&numbers, a-f, >> g-l, m-r, and s-z. > > Part of the solution might be to use a grouping key created using > > translate(., 'abcdefghijklmnopqrstuvwxyz', 'aaaaaaggggggmmmmmmssssssss') > Having had a chance to play with this on the outer xsl:for-each-group I did: <xsl:for-each-group select="$persNamesWithoutKey" group-by="translate(substring(normalize-space(lower-case(.)),1,1),'abcdefghijklmnopqrstuvwxyz012345678[,+(.><&&amp; ', 'aaaaaaggggggmmmmmmssssssss999999999---------') "> and with some minor cosmetic changes through the rest that did it absolutely perfectly for my needs. I post this just for posterity (i.e. anyone else searching for a similar answer and in several months when I've forgotten how/why I did something like this!) ;-) Many thanks, -James | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
