|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: generating <a href="#section"> menus. Related to <
Sherzod Ruzmetov wrote:
neither do I so I thought there had to be an easier way, and guess what, there was :-). Yes. I am generating the descriptive IDs from the section titles: <t:template name="toc" xml:space="preserve">
<div id="tocunit">
<h2>
<a id="toc" name="toc">
<acronym title="Table Of Contents">TOC</acronym> (this page):
</a>
</h2>
<ul title="toc" class="inline">
<li class="skipNavigation">
<a href="#main">To Content</a>,
</li>
<t:for-each select="//sect1" xml:space="default">
<li>
<a>
<t:attribute name="href">
<t:text>#</t:text>
<t:call-template name="clean">
<t:with-param name="input" select="title"/>
</t:call-template>
</t:attribute>
<t:value-of select="title"/>
</a>
<t:if test="following::sect1">
<t:text>, </t:text>
</t:if>
</li>
<t:text>
</t:text>
</t:for-each>
</ul>
</div>
</t:template>template name="clean" strips spaces, some characters, and lowercases the string. Tobi -- Vim users donate. http://iccf-holland.org/donate.html Web developers check. http://www.pinkjuice.com/check/ 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
|

Cart








