</xsl:choose>
</xsl:when>
<xsl:otherwise>
- <xsl:apply-templates select="/" mode="process.root"/>
+ <xsl:if test="$collect.xref.targets = 'yes' or
+ $collect.xref.targets = 'only'">
+ <xsl:apply-templates select="/" mode="collect.targets"/>
+ </xsl:if>
+ <xsl:if test="$collect.xref.targets != 'only'">
+ <xsl:apply-templates select="/" mode="process.root"/>
+ </xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
- <xsl:call-template name="hhp"/>
- <xsl:call-template name="hhc"/>
- <xsl:if test="($rootid = '' and //processing-instruction('dbhh')) or
- ($rootid != '' and key('id',$rootid)//processing-instruction('dbhh'))">
- <xsl:call-template name="hh-map"/>
- <xsl:call-template name="hh-alias"/>
- </xsl:if>
- <xsl:if test="$htmlhelp.generate.index">
- <xsl:call-template name="hhk"/>
+
+ <xsl:if test="$collect.xref.targets != 'only'">
+ <xsl:call-template name="hhp"/>
+ <xsl:call-template name="hhc"/>
+ <xsl:if test="($rootid = '' and //processing-instruction('dbhh')) or
+ ($rootid != '' and key('id',$rootid)//processing-instruction('dbhh'))">
+ <xsl:call-template name="hh-map"/>
+ <xsl:call-template name="hh-alias"/>
+ </xsl:if>
+ <xsl:if test="$htmlhelp.generate.index">
+ <xsl:call-template name="hhk"/>
+ </xsl:if>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
<xsl:variable name="raw.help.title">
<xsl:choose>
<xsl:when test="$htmlhelp.title = ''">
- <xsl:choose>
- <xsl:when test="$rootid != ''">
- <xsl:apply-templates select="key('id',$rootid)" mode="title.markup"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="/*" mode="title.markup"/>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="$rootid != ''">
+ <xsl:apply-templates select="key('id',$rootid)" mode="title.markup"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="/*" mode="title.markup"/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="$htmlhelp.title"/>
+ <xsl:value-of select="$htmlhelp.title"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="useobject">
<xsl:choose>
- <!-- The phrase is never used -->
+ <!-- The phrase is never used -->
<xsl:when test="name($object)='textobject' and $object/phrase">
<xsl:text>0</xsl:text>
</xsl:when>
- <!-- The first textobject is a reasonable fallback (but not for image in HH) -->
+ <!-- The first textobject is a reasonable fallback (but not for image in HH) -->
<xsl:when test="name($object)='textobject'">
<xsl:text>0</xsl:text>
</xsl:when>
- <!-- If there's only one object, use it -->
- <xsl:when test="$count = 1 and count($olist) = 1">
- <xsl:text>1</xsl:text>
- </xsl:when>
- <!-- Otherwise, see if this one is a useable graphic -->
+ <!-- If there's only one object, use it -->
+ <xsl:when test="$count = 1 and count($olist) = 1">
+ <xsl:text>1</xsl:text>
+ </xsl:when>
+ <!-- Otherwise, see if this one is a useable graphic -->
<xsl:otherwise>
<xsl:choose>
<!-- peek inside imageobjectco to simplify the test -->
<xsl:variable name="filename">
<xsl:choose>
<xsl:when test="starts-with($urifilename, 'file:/')">
- <xsl:value-of select="substring-after($urifilename, 'file:/')"/>
+ <xsl:value-of select="substring-after($urifilename, 'file:/')"/>
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="$urifilename"/>
+ <xsl:value-of select="$urifilename"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="content">
<xsl:choose>
<xsl:when test="$rootid != ''">
- <xsl:apply-templates select="key('id',$rootid)" mode="hhc"/>
+ <xsl:apply-templates select="key('id',$rootid)" mode="hhc"/>
</xsl:when>
<xsl:otherwise>
- <xsl:apply-templates select="/" mode="hhc"/>
+ <xsl:apply-templates select="/" mode="hhc"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
</param>&lf;
<param name="Local">
<xsl:attribute name="value">
- <xsl:choose>
- <xsl:when test="$chunk.tocs.and.lots != 0">
- <xsl:apply-templates select="." mode="recursive-chunk-filename">
- <xsl:with-param name="recursive" select="true()"/>
- </xsl:apply-templates>
- <xsl:text>-toc</xsl:text>
- <xsl:value-of select="$html.ext"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="href.target.with.base.dir"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
+ <xsl:choose>
+ <xsl:when test="$chunk.tocs.and.lots != 0">
+ <xsl:apply-templates select="." mode="recursive-chunk-filename">
+ <xsl:with-param name="recursive" select="true()"/>
+ </xsl:apply-templates>
+ <xsl:text>-toc</xsl:text>
+ <xsl:value-of select="$html.ext"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="href.target.with.base.dir"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
</param>
</OBJECT></LI>&lf;
</xsl:if>
<LI><OBJECT type="text/sitemap">&lf;
<param name="Name">
<xsl:attribute name="value">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'TableofContents'"/>
- </xsl:call-template>
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'TableofContents'"/>
+ </xsl:call-template>
</xsl:attribute>
</param>&lf;
<param name="Local">
- <xsl:attribute name="value">
- <xsl:choose>
- <xsl:when test="$chunk.tocs.and.lots != 0">
- <xsl:apply-templates select="." mode="recursive-chunk-filename">
- <xsl:with-param name="recursive" select="true()"/>
- </xsl:apply-templates>
- <xsl:text>-toc</xsl:text>
- <xsl:value-of select="$html.ext"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="href.target.with.base.dir"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:choose>
+ <xsl:when test="$chunk.tocs.and.lots != 0">
+ <xsl:apply-templates select="." mode="recursive-chunk-filename">
+ <xsl:with-param name="recursive" select="true()"/>
+ </xsl:apply-templates>
+ <xsl:text>-toc</xsl:text>
+ <xsl:value-of select="$html.ext"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="href.target.with.base.dir"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
</param>
</OBJECT></LI>&lf;
</xsl:if>
<xsl:apply-templates select="part|reference|preface|chapter|bibliography|appendix|article|colophon|glossary"
- mode="hhc"/>
+ mode="hhc"/>
</UL>&lf;
</xsl:if>
</xsl:template>
<xsl:if test="article|reference|preface|chapter|appendix|refentry|section|sect1|bibliodiv">
<UL>&lf;
<xsl:apply-templates
- select="article|reference|preface|chapter|appendix|refentry|section|sect1|bibliodiv"
- mode="hhc"/>
+ select="article|reference|preface|chapter|appendix|refentry|section|sect1|bibliodiv"
+ mode="hhc"/>
</UL>
</xsl:if>
</xsl:template>
<xsl:if test="sect2[$htmlhelp.hhc.section.depth > 1]|refentry">
<UL>&lf;
<xsl:apply-templates select="sect2|refentry"
- mode="hhc"/>
+ mode="hhc"/>
</UL>
</xsl:if>
</xsl:template>
<xsl:if test="sect3[$htmlhelp.hhc.section.depth > 2]|refentry">
<UL>&lf;
<xsl:apply-templates select="sect3|refentry"
- mode="hhc"/>
+ mode="hhc"/>
</UL>
</xsl:if>
</xsl:template>
<xsl:if test="sect4[$htmlhelp.hhc.section.depth > 3]|refentry">
<UL>&lf;
<xsl:apply-templates select="sect4|refentry"
- mode="hhc"/>
+ mode="hhc"/>
</UL>
</xsl:if>
</xsl:template>
<xsl:if test="sect5[$htmlhelp.hhc.section.depth > 4]|refentry">
<UL>&lf;
<xsl:apply-templates select="sect5|refentry"
- mode="hhc"/>
+ mode="hhc"/>
</UL>
</xsl:if>
</xsl:template>
<xsl:if test="refentry">
<UL>&lf;
<xsl:apply-templates select="refentry"
- mode="hhc"/>
+ mode="hhc"/>
</UL>
</xsl:if>
</xsl:template>
<xsl:if test="tertiary">
<xsl:if test="not(//indexterm[normalize-space(primary)=$primary and
- normalize-space(secondary)=$secondary and not(tertiary)])">
+ normalize-space(secondary)=$secondary and not(tertiary)])">
<xsl:call-template name="write.indexterm">
<xsl:with-param name="text" select="concat($primary, ', ', $secondary)"/>
</xsl:call-template>
<xsl:call-template name="href.target.with.base.dir"/>
</xsl:variable>
<xsl:variable name="title">
- <xsl:call-template name="nearest.title">
- <xsl:with-param name="object" select=".."/>
- </xsl:call-template>
+ <xsl:call-template name="nearest.title">
+ <xsl:with-param name="object" select=".."/>
+ </xsl:call-template>
</xsl:variable>
<param name="Name">