Den 19. jan. 2007 kl. 18.58 skrev [EMAIL PROTECTED]:

Author: sjur
Date: Fri Jan 19 08:58:30 2007
New Revision: 497876

My first commit:-)

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

Please check that everything is fine, including EOL etc.

Modified: forrest/trunk/main/webapp/resources/stylesheets/html-to- document.xsl URL: http://svn.apache.org/viewvc/forrest/trunk/main/webapp/ resources/stylesheets/html-to-document.xsl? view=diff&rev=497876&r1=497875&r2=497876 ====================================================================== ======== --- forrest/trunk/main/webapp/resources/stylesheets/html-to- document.xsl (original) +++ forrest/trunk/main/webapp/resources/stylesheets/html-to- document.xsl Fri Jan 19 08:58:30 2007
@@ -66,10 +66,12 @@
     <!--infer structure from sibling headings-->
     <xsl:template match="body">
        <body>
- <!-- some paragraphs may be included before the first title... -->
-       <xsl:apply-templates select="*[1]" mode="next"/>
         <xsl:choose>
           <xsl:when test="h1">
+ <!-- some paragraphs may be included before the first title... -->
+            <xsl:if test="name(*[1]) != 'h1'">
+              <xsl:apply-templates select="*[1]" mode="next"/>
+            </xsl:if>
             <xsl:call-template name="process_h1"/>
           </xsl:when>
           <xsl:otherwise>
@@ -311,8 +313,6 @@
                    <xsl:apply-templates/>
                    </xsl:otherwise>
            </xsl:choose>
-
-      <xsl:apply-templates select="./*"/>
     </xsl:template>

<xsl:template match="@*|*|text()|processing-instruction()| comment()">

I forgot one of my own rules before commiting a change: always review the changes (ie do a diff before svn ci) - thus, I missed the last change I had made, and forgot to comment it. The change actually resolves issue 704, and possibly also the other bug described in the last comment in that issue.

Sjur