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/06/29 19:19:31 UTC

svn commit: r202404 - /forrest/branches/locationmap_branch/main/webapp/resources/stylesheets/html2document.xsl

Author: rgardler
Date: Wed Jun 29 10:19:30 2005
New Revision: 202404

URL: http://svn.apache.org/viewcvs?rev=202404&view=rev
Log:
better handling of html documents without a starting h1 element

Modified:
    forrest/branches/locationmap_branch/main/webapp/resources/stylesheets/html2document.xsl

Modified: forrest/branches/locationmap_branch/main/webapp/resources/stylesheets/html2document.xsl
URL: http://svn.apache.org/viewcvs/forrest/branches/locationmap_branch/main/webapp/resources/stylesheets/html2document.xsl?rev=202404&r1=202403&r2=202404&view=diff
==============================================================================
--- forrest/branches/locationmap_branch/main/webapp/resources/stylesheets/html2document.xsl (original)
+++ forrest/branches/locationmap_branch/main/webapp/resources/stylesheets/html2document.xsl Wed Jun 29 10:19:30 2005
@@ -66,21 +66,8 @@
     <!--infer structure from sibling headings-->
     <xsl:template match="body">
        <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>
+          <xsl:apply-templates select="*[1]" mode="next"/>
+          <xsl:call-template name="process_h1"/>
        </body>
     </xsl:template>
     
@@ -128,7 +115,7 @@
          </section>
        </xsl:for-each>
     </xsl:template>
-
+    
     <!--process each sibling in order until the next heading level-->
 
     <xsl:template match="*" mode="next">