]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/style/content_to_html.xsl
In natural language, non vengono piu' stampati glia argomenti
[helm.git] / helm / style / content_to_html.xsl
index 75b7bcc3adf7f3b7ed6b0cb307806b214be52023..9708f3cd7291c7e9fa1ac4c21daa23fba4c47034 100644 (file)
           <xsl:with-param name="current_indent" select="$current_indent + 2"/>
          </xsl:apply-templates>
          <xsl:text>&gt; </xsl:text>
+         <br/>
+         <xsl:call-template name="make_indent">
+          <xsl:with-param name="current_indent" select="$current_indent + 2"/>           </xsl:call-template>
          <xsl:text>CASE </xsl:text>
          <xsl:apply-templates select="*[position()=3]">
           <xsl:with-param name="current_indent" select="$current_indent + 8"/>
          <xsl:for-each select="*[position() mod 2 = 0 and position()>3]">
          <br/>
          <xsl:call-template name="make_indent">
-            <xsl:with-param name="current_indent" select="$current_indent + 2"/>  
+          <xsl:with-param name="current_indent" select="$current_indent + 2"/> 
          </xsl:call-template> 
             <xsl:choose>
             <xsl:when test="position() = 1">
             </xsl:choose>
             <xsl:apply-templates select="."/>
             <FONT FACE="Symbol" SIZE="+0" mathcolor="green">&#222;</FONT>
-            <xsl:apply-templates select="following-sibling::*[position()= 1]">
-             <xsl:with-param name="current_indent" select="$current_indent + 4 + string-length()"/>
-            </xsl:apply-templates>
+            <xsl:variable name="body_size">
+             <xsl:apply-templates 
+              select="following-sibling::*[1]/*[1]" mode="charcount"/>
+            </xsl:variable>
+            <xsl:choose>
+             <xsl:when test="$body_size > $framewidth">
+              <br/>
+              <xsl:call-template name="make_indent">
+               <xsl:with-param name="current_indent" 
+                    select="$current_indent + 8"/>   
+              </xsl:call-template>
+             <xsl:apply-templates 
+                   select="following-sibling::*[position()= 1]">
+              <xsl:with-param name="current_indent" 
+                   select="$current_indent + 8"/>      
+             </xsl:apply-templates>
+            </xsl:when>
+            <xsl:otherwise>
+             <xsl:apply-templates select="following-sibling::*[position()= 1]"
+                   mode="inline" />
+            </xsl:otherwise>
+           </xsl:choose>
          </xsl:for-each>
        </xsl:when>
        <xsl:otherwise>