[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Creating index headers
Hi there, I have a glossary of scientific terms in xml that contains entries like this: <entry type='n'> <term>A term</term> <treq>Finnish translation equivalen</treq> <def>Definition(s) of the term</def> ... some other fields omitted </entry> I would like to create html-version of the glossary where all the entries would be sorted alphabetically using the content of term-element as sort key. For each new beginning letter I would like to produce a header and anchor like this: <h2>A</h2> <a name=a"/> <dl> <dt type="term">A term</dt> <dt type="treq">Finnish translation equivalent</dt> <dd>Definitions of the term</dd> <h2>B</h2> ... My first cut at the problem was creating a variable for each letter in the alphabet, like this <xsl:variable name="a" select="/glossary/entry[substring(term,1,1)='a']|entry[substring(term, 1,1)='A']"/> <xsl:variable name="b" select="/glossary/entry[substring(term,1,1)='b']|entry[substring(term, 1,1)='B']"/> However the glossary contains also numbers and symbols (, +, α, β etc that I would like to lump under a common heading of "Numbers and symbols". Any suggestions? -- Manne MIETTINEN manne.miettinen@xxxxxx CSC - Scientific Computing Ltd. +358 9 457 2517 (Tel) PO BOX 405 +358 50 381 9510 (GSM) FIN 02101 Espoo, FINLAND +358 9 457 2302 (Fax) XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|