You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by rg...@apache.org on 2005/10/25 11:30:56 UTC

svn commit: r328319 - /forrest/trunk/main/webapp/resources/stylesheets/html-to-document.xsl

Author: rgardler
Date: Tue Oct 25 02:30:51 2005
New Revision: 328319

URL: http://svn.apache.org/viewcvs?rev=328319&view=rev
Log:
re-apply chagnes lost in the merge of the locationmap branch

Modified:
    forrest/trunk/main/webapp/resources/stylesheets/html-to-document.xsl

Modified: forrest/trunk/main/webapp/resources/stylesheets/html-to-document.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/resources/stylesheets/html-to-document.xsl?rev=328319&r1=328318&r2=328319&view=diff
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/html-to-document.xsl (original)
+++ forrest/trunk/main/webapp/resources/stylesheets/html-to-document.xsl Tue Oct 25 02:30:51 2005
@@ -56,17 +56,32 @@
     </xsl:template>
         
     <xsl:template match="meta">
-        <xsl:copy>
-            <xsl:apply-templates select="node()|@*"/>
-        </xsl:copy>
+        <xsl:text disable-output-escaping = "yes"><![CDATA[ <!-- ]]></xsl:text>
+          <xsl:copy>
+              <xsl:apply-templates select="node()|@*"/>
+          </xsl:copy>
+        <xsl:text disable-output-escaping = "yes"><![CDATA[ --> ]]></xsl:text>
     </xsl:template>  
     
     <!--infer structure from sibling headings-->
     <xsl:template match="body">
        <body>
-          <xsl:apply-templates select="*[1]" mode="next"/>
-          <xsl:call-template name="process_h1"/>
-       </body>
+        <xsl:choose>
+          <xsl:when test="h1">
+            <xsl:call-template name="process_h1"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <section>
+              <xsl:if test="a/@name">
+                <xsl:attribute name="id"><xsl:value-of select="a/@name"/></xsl:attribute>
+              </xsl:if>
+              <title/>
+              <xsl:apply-templates/>
+              <xsl:call-template name="process_h1"/>
+            </section>
+          </xsl:otherwise>
+        </xsl:choose>
+      </body>
     </xsl:template>
     
     <xsl:template name="process_h1">