[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

alphabetic set of xsl:result-document

Subject: alphabetic set of xsl:result-document
From: James Cummings <cummings.james@xxxxxxxxx>
Date: Mon, 22 Aug 2005 13:58:53 +0100
alphabetic christmas words
I know I'm just being silly and this should be obvious to me.  Maybe
it is because it is Monday.

Ok, assuming I have an XML input file with at various levels lots of
words marked up <w>as</w> <w>such</w>, and I'm producing an
alphabetically sorted index of them.

Currently this is being done with the following (highly abbreviated
and simplified):

<!-- setup key for words -->
<xsl:key name="word" match="w" use="lower-case(.)" />
<!-- Iniside root template match  group by word then sort -->
<xsl:for-each-group select="//div[@type='psalm']//w"
     <xsl:sort select="lower-case(.)" />
<!-- Output each word (and associated references, etc.) inside an
xsl:for-each -->
        <xsl:for-each select="key('word', lower-case(.)">

What I want to do is group each of the output words and create a
separate file for each letter of the alphabet matched.  I've been
assuming that I put the xsl:result-document in an xsl:for-each inside
the xsl:for-each-group above, but my attempts so far have failed.  So
I guess my questions are how do I say "for-each unique starting-letter
of the words create a result-document only including words starting
with that letter"? And am I right that this should be inside the
xsl:for-each-group ?

Needing more sleep,


James Cummings, Cummings dot James at GMail dot com

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.