You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by cr...@apache.org on 2004/07/22 09:38:39 UTC

svn commit: rev 23139 - forrest/trunk/src/core/context/resources/stylesheets

Author: crossley
Date: Thu Jul 22 00:38:38 2004
New Revision: 23139

Modified:
   forrest/trunk/src/core/context/resources/stylesheets/html2document.xsl
Log:
Add crude method with <a name="XXX"/> to get section id.
Enable better fragment identifiers than the default, which is to URLencode
the title. Such fragment identifiers get really nasty with verbose titles.


Modified: forrest/trunk/src/core/context/resources/stylesheets/html2document.xsl
==============================================================================
--- forrest/trunk/src/core/context/resources/stylesheets/html2document.xsl	(original)
+++ forrest/trunk/src/core/context/resources/stylesheets/html2document.xsl	Thu Jul 22 00:38:38 2004
@@ -67,6 +67,9 @@
        <body>
          <xsl:for-each select="h1">
            <section>
+      <xsl:if test="a/@name">
+        <xsl:attribute name="id"><xsl:value-of select="a/@name"/></xsl:attribute>
+      </xsl:if>
              <title><xsl:apply-templates/></title>
              <xsl:apply-templates select="following-sibling::*[1]" mode="next"/>
              <xsl:for-each select="key('h2s',generate-id(.))">