?? hhc.xsl
字號:
<xsl:when test="$name='common'">
<xsl:value-of select="normalize-space($message[@id='apachempmcommon'])" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="normalize-space($message[@id='apachempm'])" />
<xsl:text> </xsl:text>
<xsl:value-of select="$name" />
</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
<xsl:with-param name="href"
select="concat('mod/', $current/name, '.html')" />
<xsl:with-param name="indent" select="'			'" />
</xsl:call-template>
<xsl:call-template name="sections-and-directives">
<xsl:with-param name="current" select="$current" />
</xsl:call-template>
&li.end; &lf;&tab;
</xsl:template>
<!-- /toc-entry.mpm -->
<!-- ==================================================================== -->
<!-- toc-entry.module -->
<!-- create entry (and initiate subsection entries) of a module -->
<!-- ==================================================================== -->
<xsl:template name="toc-entry.module">
<xsl:param name="current"/>
&li.start;
<xsl:call-template name="object">
<xsl:with-param name="name">
<xsl:value-of select="normalize-space($message[@id='apachemodule'])" />
<xsl:text> </xsl:text>
<xsl:value-of select="$current/name" />
</xsl:with-param>
<xsl:with-param name="href"
select="concat('mod/', $current/name, '.html')" />
<xsl:with-param name="indent" select="'			'" />
</xsl:call-template>
<xsl:call-template name="sections-and-directives">
<xsl:with-param name="current" select="$current" />
</xsl:call-template>
&li.end; &lf;&tab;
</xsl:template>
<!-- /toc-entry.module -->
<!-- ==================================================================== -->
<!-- sections-and-directives -->
<!-- process sections and directives of a module file -->
<!-- ==================================================================== -->
<xsl:template name="sections-and-directives">
<xsl:param name="current" />
<xsl:if test="count($current/section) > 0 or
count($current/directivesynopsis) > 0">
&lf;&tab;&tab;
&ul.start; &lf;&tab;&tab;
<!-- sections -->
<xsl:for-each select="$current/section">
&li.start;
<xsl:call-template name="object">
<xsl:with-param name="name" select="normalize-space(title)" />
<xsl:with-param name="href">
<xsl:if test="@id">
<xsl:value-of
select="concat('mod/', $current/name, '.html#', @id)" />
</xsl:if>
</xsl:with-param>
<xsl:with-param name="indent" select="'				'" />
</xsl:call-template>
&li.end; &lf;&tab;&tab;
</xsl:for-each>
<!-- directives within the current document -->
<xsl:for-each select="$current/directivesynopsis[not(@location)]">
<xsl:sort select="name" />
&li.start;
<xsl:call-template name="object">
<xsl:with-param name="name">
<xsl:if test="@type='section'"><</xsl:if>
<xsl:value-of select="name"/>
<xsl:if test="@type='section'">></xsl:if>
<xsl:choose>
<xsl:when test="$message[@id='directive']
/@replace-space-with">
<xsl:value-of select="$message[@id='directive']
/@replace-space-with" />
</xsl:when>
<xsl:otherwise>
<xsl:text> </xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="normalize-space($message[@id='directive'])" />
</xsl:with-param>
<xsl:with-param name="href"
select="concat('mod/', $current/name, '.html#',
translate(name, $uppercase, $lowercase))" />
<xsl:with-param name="indent" select="'				'" />
<xsl:with-param name="icon" select="$icon.directive" />
</xsl:call-template>
&li.end; &lf;&tab;&tab;
</xsl:for-each>
<!-- directives described elsewhere -->
<xsl:for-each select="$current/directivesynopsis[@location]">
<xsl:sort select="name" />
&li.start;
<xsl:call-template name="object">
<xsl:with-param name="name">
<xsl:if test="@type='section'"><</xsl:if>
<xsl:value-of select="name"/>
<xsl:if test="@type='section'">></xsl:if>
<xsl:choose>
<xsl:when test="$message[@id='directive']
/@replace-space-with">
<xsl:value-of select="$message[@id='directive']
/@replace-space-with" />
</xsl:when>
<xsl:otherwise>
<xsl:text> </xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="normalize-space($message[@id='directive'])" />
</xsl:with-param>
<xsl:with-param name="href"
select="concat('mod/', @location, '.html#',
translate(name, $uppercase, $lowercase))" />
<xsl:with-param name="indent" select="'				'" />
<xsl:with-param name="icon" select="$icon.commondirective" />
</xsl:call-template>
&li.end; &lf;&tab;&tab;
</xsl:for-each>
&ul.end; &lf;&tab;
</xsl:if> <!-- sections or directives present -->
</xsl:template>
<!-- /sections-and-directives -->
<!-- ==================================================================== -->
<!-- object -->
<!-- display an <object> and do some magic to select the right content -->
<!-- ==================================================================== -->
<xsl:template name="object">
<xsl:param name="name" select="'? unknown ?'" />
<xsl:param name="href" />
<xsl:param name="icon" select="$icon.section" />
<xsl:param name="indent" />
<xsl:variable name="href.offline">
<xsl:call-template name="helper.href.offline">
<xsl:with-param name="href" select="$href" />
</xsl:call-template>
</xsl:variable>
<!-- xml file is expected to have the same basename -->
<xsl:variable name="xml"
select="concat(substring-before($href.offline, '.html'), '.xml')" />
<xsl:text><object type="text/sitemap"></xsl:text>&lf;
<xsl:value-of select="$indent" />
<xsl:text><param name="Name" value="</xsl:text>
<xsl:call-template name="filter.attval">
<xsl:with-param name="text" select="$name" />
</xsl:call-template>
<xsl:text>"></xsl:text>&lf;
<xsl:value-of select="$indent" />
<xsl:if test="string-length($href.offline) > 0">
<xsl:text><param name="Local" value="</xsl:text>
<xsl:call-template name="filter.attval">
<xsl:with-param name="text" select="$href.offline" />
</xsl:call-template>
<xsl:text>"></xsl:text>&lf;
<xsl:value-of select="$indent" />
</xsl:if>
<xsl:text><param name="ImageNumber" value="</xsl:text>
<xsl:choose>
<xsl:when test="string-length($href.offline) > 0">
<xsl:choose>
<xsl:when test="contains($href, '#')">
<xsl:value-of select="$icon" />
</xsl:when>
<xsl:when test="$doclang='en' or
(not($xml = $not-exists) and
(document(document(concat($basedir, $xml))
/*/@metafile)
/metafile/variants/variant
[.=$doclang and not(@htmlonly='yes')]))">
<xsl:value-of select="$icon.document" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$icon.document.not-translated" />
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$icon.no-anchor" />
</xsl:otherwise>
</xsl:choose>
<xsl:text>"></xsl:text>&lf;
<xsl:value-of select="substring($indent, 2)" />
<xsl:text></object></xsl:text>
</xsl:template>
<!-- /object -->
<!-- ==================================================================== -->
<!-- folder -->
<!-- ==================================================================== -->
<xsl:template name="folder">
<xsl:param name="name" select="'? unknown ?'" />
<xsl:text><object type="text/sitemap"></xsl:text>&lf;&tab;&tab;
<xsl:text><param name="Name" value="</xsl:text>
<xsl:call-template name="filter.attval">
<xsl:with-param name="text" select="$name" />
</xsl:call-template>
<xsl:text>"></xsl:text>&lf;&tab;
<xsl:text></object></xsl:text>
</xsl:template>
<!-- /folder -->
<!-- ==================================================================== -->
<!-- helper.href.offline -->
<!-- change uri reference to work offline (/ -> /index.html) -->
<!-- ==================================================================== -->
<xsl:template name="helper.href.offline">
<xsl:param name="href" />
<xsl:choose>
<xsl:when test="string-length($href) = 0" />
<xsl:when test="contains($href, '#') and '/' = substring($href,
string-length(substring-before($href, '#')), 1)">
<xsl:value-of select="substring-before($href, '#')" />
<xsl:text>index.html#</xsl:text>
<xsl:value-of select="substring-after($href, '#')" />
</xsl:when>
<xsl:when test="substring($href, string-length($href), 1) = '/'">
<xsl:value-of select="$href" />
<xsl:text>index.html</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$href" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- /helper.href.offline -->
<!-- ==================================================================== -->
<!-- filter.attval -->
<!-- escape special characters for being valid within an attribute -->
<!-- ==================================================================== -->
<xsl:template name="filter.attval">
<xsl:param name="text" />
<xsl:choose>
<xsl:when test="contains($text, '&')">
<xsl:call-template name="filter.attval.special">
<xsl:with-param name="text" select="substring-before($text, '&')" />
</xsl:call-template>
<xsl:text>&amp;</xsl:text>
<xsl:call-template name="filter.attval">
<xsl:with-param name="text" select="substring-after($text, '&')" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="filter.attval.special">
<xsl:with-param name="text" select="$text" />
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- /filter.attval -->
<!-- ==================================================================== -->
<!-- filter.attval.special -->
<!-- accompanying template of filter.attval -->
<!-- ==================================================================== -->
<xsl:template name="filter.attval.special">
<xsl:param name="text" />
<xsl:choose>
<xsl:when test="contains($text, '<')">
<xsl:value-of select="substring-before($text, '<')" />
<xsl:text>&lt;</xsl:text>
<xsl:call-template name="filter.attval.special">
<xsl:with-param name="text" select="substring-after($text, '<')" />
</xsl:call-template>
</xsl:when>
<xsl:when test="contains($text, '>')">
<xsl:value-of select="substring-before($text, '>')" />
<xsl:text>&gt;</xsl:text>
<xsl:call-template name="filter.attval.special">
<xsl:with-param name="text" select="substring-after($text, '>')" />
</xsl:call-template>
</xsl:when>
<xsl:when test="contains($text, '"')">
<xsl:value-of select="substring-before($text, '"')" />
<xsl:text>&quot;</xsl:text>
<xsl:call-template name="filter.attval.special">
<xsl:with-param name="text" select="substring-after($text, '"')" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$text" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- /filter.attval.special -->
</xsl:stylesheet>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -