Generate linked alphabet for index
Post here questions and problems related to editing and publishing DITA content.
			- 
				ann.jensen
 - Posts: 316
 - Joined: Wed Jun 17, 2015 10:19 am
 
Generate linked alphabet for index
Post by ann.jensen »
Hi,
I have had a client request to generate an alphabet with linked letters at the top of indexTerms.html to provide quick access to the index contents for a given letter e.g. T.
Can anyone advise on where such a customisation would be implemented?
Thanks in advance,
Ann
			
			
									
									
						I have had a client request to generate an alphabet with linked letters at the top of indexTerms.html to provide quick access to the index contents for a given letter e.g. T.
Can anyone advise on where such a customisation would be implemented?
Thanks in advance,
Ann
- 
				Radu
 - Posts: 9547
 - Joined: Fri Jul 09, 2004 5:18 pm
 
Re: Generate linked alphabet for index
Hi Ann,
Interesting idea, I will also add an improvement request for this to our internal issues list.
I assume you want this for WebHelp Responsive.
In the XSLT stylesheet:
OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT2.x\plugins\com.oxygenxml.webhelp\xsl\dita\responsive\createMainFilesImpl.xsl
there is an XSLT template which generates the entire index list grouping index terms in categories:
in that XSLT template, after the variable named "collation" is defined you can iterate all existing letter categories and create a list of links:
Further down, for each letter a list item is created:
and you need to set an @id attribute on it so that the links to it start working:
Regards,
Radu
			
			
									
									Interesting idea, I will also add an improvement request for this to our internal issues list.
I assume you want this for WebHelp Responsive.
In the XSLT stylesheet:
OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT2.x\plugins\com.oxygenxml.webhelp\xsl\dita\responsive\createMainFilesImpl.xsl
there is an XSLT template which generates the entire index list grouping index terms in categories:
Code: Select all
 <xsl:template match="index:index" mode="create-index">
 ......................
 Code: Select all
    <xsl:for-each-group select="index:term" group-by="
      upper-case(
      translate(
      substring(
      normalize-unicode(@sort-as, 'NFD'), 1, 1), $katakana_chars, $hiragana_chars))" 
      collation="{$collation}">
      <a href="#index_category_{current-grouping-key()}"><xsl:value-of select="current-grouping-key()"/></a>
      <xsl:text> </xsl:text>
    </xsl:for-each-group>Code: Select all
<li class="wh_term_group">
........
Code: Select all
<li class="wh_term_group" id="index_category_{current-grouping-key()}">
..............
Radu
Radu Coravu 
<oXygen/> XML Editor
http://www.oxygenxml.com
						<oXygen/> XML Editor
http://www.oxygenxml.com
- 
				ann.jensen
 - Posts: 316
 - Joined: Wed Jun 17, 2015 10:19 am
 
Re: Generate linked alphabet for index
Post by ann.jensen »
Thank you so much for that.
It works a treat
Ann
			
			
									
									
						It works a treat
Ann
Return to “DITA (Editing and Publishing DITA Content)”
			
				Jump to
				
			
		
			
			
	
	- Oxygen XML Editor/Author/Developer
 - ↳ Feature Request
 - ↳ Common Problems
 - ↳ DITA (Editing and Publishing DITA Content)
 - ↳ Artificial Intelligence (AI Positron Assistant add-on)
 - ↳ SDK-API, Frameworks - Document Types
 - ↳ DocBook
 - ↳ TEI
 - ↳ XHTML
 - ↳ Other Issues
 - Oxygen XML Web Author
 - ↳ Feature Request
 - ↳ Common Problems
 - Oxygen Content Fusion
 - ↳ Feature Request
 - ↳ Common Problems
 - Oxygen JSON Editor
 - ↳ Feature Request
 - ↳ Common Problems
 - Oxygen PDF Chemistry
 - ↳ Feature Request
 - ↳ Common Problems
 - Oxygen Feedback
 - ↳ Feature Request
 - ↳ Common Problems
 - Oxygen XML WebHelp
 - ↳ Feature Request
 - ↳ Common Problems
 - XML
 - ↳ General XML Questions
 - ↳ XSLT and FOP
 - ↳ XML Schemas
 - ↳ XQuery
 - NVDL
 - ↳ General NVDL Issues
 - ↳ oNVDL Related Issues
 - XML Services Market
 - ↳ Offer a Service