[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Creating a TOC where Alpha Character does not exist


Subject: [xsl] Creating a TOC where Alpha Character does not exist
From: "Spencer Tickner" <spencertickner@xxxxxxxxx>
Date: Wed, 31 May 2006 14:04:15 -0800

Hi List,

Thanks in advance for the help.

I'm creating a toc from an xml document based on a folder and it's
child folders and files. From this list I need to Create an Alphabet
style Table of Contents. No problem there. Where I'm getting stuck is:

If the character does not exist in the list,, I need the alpha
character added, just not linked.

XML

<root path="C:">
 <dir path="C:\test">
   <dir path="C:\test\-- A --">
       <file name="apple.xml"/>
   </dir>
  <dir path="C:\test\-- O --">
       <file name="orange.xml"/>
  </dir>
 </dir>
</root>

OK, now from the xml above I would want my htm output to look
something like this

<p><a href="#A">A</a> B C D E F G H I J K L M N <a href="#O">O</a> P Q
R S T U V W X Y Z</p>

I can match on the dir/dir and and parse out A and O, but any ideas on
how to put in the rest of the characters that do not match any of the
Alpha's in my file?

Thanks in advance for the help

Spencer


Current Thread
Keywords
xml