Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.8.1.2
    • Fix Version/s: 10.8.2.2, 10.9.1.0
    • Component/s: Documentation
    • Labels:
      None

      Description

      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>

        Attachments

        1. toc.html
          4 kB
          Kim Haase
        2. DERBY-5205.stat
          0.0 kB
          Kim Haase
        3. DERBY-5205.diff
          16 kB
          Kim Haase

          Issue Links

            Activity

              People

              • Assignee:
                chaase3 Kim Haase
                Reporter:
                chaase3 Kim Haase
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: