[
https://issues.apache.org/jira/browse/DERBY-5205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kim Haase updated DERBY-5205:
-----------------------------
Attachment: toc.html
DERBY-5205.stat
DERBY-5205.diff
Attaching DERBY-5205.diff and DERBY-5205.stat, with the following changes:
M build.xml
A lib/map2htmtoc.xsl
I'm also attaching the new toc.html file from the Getting Started guide so you
can see that the html tag now looks like those of the topic files:
<html lang="en-us" xml:lang="en-us">
I will plan to commit this patch around the end of the week unless I hear
otherwise.
> Documentation: toc.html files need lang attribute
> -------------------------------------------------
>
> Key: DERBY-5205
> URL: https://issues.apache.org/jira/browse/DERBY-5205
> Project: Derby
> Issue Type: Sub-task
> Components: Documentation
> Affects Versions: 10.8.1.2
> Reporter: Kim Haase
> Assignee: Kim Haase
> Priority: Minor
> Attachments: DERBY-5205.diff, DERBY-5205.stat, toc.html
>
>
> The generated toc.html file in the frameset has an html tag that is missing a
> lang attribute. The lang attribute is required to make the TOC file
> accessible.
> The toc.html file is generated from the XSL stylesheet
> DITA-OT1.1.2.1/xsl/map2htmtoc.xsl. It is possible to edit this stylesheet so
> that it generates the appropriate lang attribute the same way the
> DITA-OT1.1.2.1/xsl/xslhtml/dita2htmlImpl.xsl file does for the topic files.
> The modified file needs to be put in the lib directory, and the build.xml
> file needs to be modified to copy it into the correct directory.
> The file needs to call a template similar to the setTopicLanguage template in
> dita2htmlImpl.xsl; I've renamed it setTocLanguage. The file needs to import
> common/dita-utilities.xsl, which defines the getLowerCaseLang template. These
> are the changes from the original map2htmtoc.xsl.
> 21c21,23
> <
> ---
> > <!-- include language-retrieval template -->
> > <xsl:import href="common/dita-utilities.xsl"/>
> >
> 46c48,50
> < <html><xsl:value-of select="$newline"/>
> ---
> > <html>
> > <xsl:call-template name="setTocLanguage"/>
> > <xsl:value-of select="$newline"/>
> 61a66,81
> >
> > <xsl:template name="setTocLanguage">
> > <xsl:variable name="childlang">
> > <xsl:choose>
> > <xsl:when test="self::dita">
> > <xsl:for-each select="*[1]"><xsl:call-template
> > name="getLowerCaseLang"/></xsl:for-each>
> > </xsl:when>
> > <xsl:otherwise><xsl:call-template
> > name="getLowerCaseLang"/></xsl:otherwise>
> > </xsl:choose>
> > </xsl:variable>
> > <xsl:attribute name="lang"><xsl:value-of
> > select="$childlang"/></xsl:attribute>
> > <xsl:attribute name="xml:lang"><xsl:value-of
> > select="$childlang"/></xsl:attribute>
> > <xsl:if test="$childlang='ar-eg' or $childlang='ar' or $childlang='he'
> > or $childlang='he-il'">
> > <xsl:attribute name="dir">rtl</xsl:attribute>
> > </xsl:if>
> > </xsl:template>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira