[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [docbook-apps] Javahelp browser shows no contents
> -----Original Message----- > From: David O'Shea > > <book> > <title>This Is My Title</title> > <chapter id="myChapter"> > <title>Title of the Chapter</title> > <para>Blah blah blah blah blah blah <indexterm><primary>Index > Term</primary></indexterm> blah.</para> > </chapter> > </book> > > Here is the generated jhelpidx.xml that seems to be causing > the problem: > > <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?> > <!DOCTYPE index > PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp Index > Version 1.0//EN" > "http://java.sun.com/products/javahelp/index_1_0.dtd"> > <index version="1.0"> > <indexitem text="Index 
 Term" target="d0e9"/> > </index> Put the following in your JavaHelp customization layer to get rid of unwanted whitespace in index terms. I have modified the template by adding normalize-space() in four places: <xsl:template match="indexterm" mode="idx"> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <xsl:variable name="text"> <xsl:value-of select="normalize-space(primary)"/> <xsl:if test="secondary"> <xsl:text>, </xsl:text> <xsl:value-of select="normalize-space(secondary)"/> </xsl:if> <xsl:if test="tertiary"> <xsl:text>, </xsl:text> <xsl:value-of select="normalize-space(tertiary)"/> </xsl:if> </xsl:variable> <xsl:choose> <xsl:when test="see"> <xsl:variable name="see"><xsl:value-of select="normalize-space(see)"/></xsl:variable> <indexitem text="{$text} see '{$see}'"/> </xsl:when> <xsl:otherwise> <indexitem text="{$text}" target="{$id}"/> </xsl:otherwise> </xsl:choose> </xsl:template> /MJ
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]