XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 10.8.1.2
    • 10.8.2.2, 10.9.1.0
    • Documentation
    • 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
          Camilla Haase
        2. DERBY-5205.stat
          0.0 kB
          Camilla Haase
        3. DERBY-5205.diff
          16 kB
          Camilla Haase

        Issue Links

          Activity

            People

              chaase3 Camilla Haase
              chaase3 Camilla Haase
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: