forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r123893 - /forrest/trunk/plugins/org.apache.forrest.plugin.text-output/resources/stylesheets/txt/document2txt.xsl
Date Sun, 02 Jan 2005 17:48:43 GMT
Author: rick
Date: Sun Jan  2 09:48:41 2005
New Revision: 123893

URL: http://svn.apache.org/viewcvs?view=rev&rev=123893
Log:
Handle div and span elements by simply applying templates and passing
through information to those other templates.

Although not currently necessary for the document v1.x and v2.x XML, it
will be necessary for HTML / XHTML docs when those are used as the
internal format.


Modified:
   forrest/trunk/plugins/org.apache.forrest.plugin.text-output/resources/stylesheets/txt/document2txt.xsl

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.text-output/resources/stylesheets/txt/document2txt.xsl
Url: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.text-output/resources/stylesheets/txt/document2txt.xsl?view=diff&rev=123893&p1=forrest/trunk/plugins/org.apache.forrest.plugin.text-output/resources/stylesheets/txt/document2txt.xsl&r1=123892&p2=forrest/trunk/plugins/org.apache.forrest.plugin.text-output/resources/stylesheets/txt/document2txt.xsl&r2=123893
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.text-output/resources/stylesheets/txt/document2txt.xsl
(original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.text-output/resources/stylesheets/txt/document2txt.xsl
Sun Jan  2 09:48:41 2005
@@ -256,6 +256,26 @@
 
   </xsl:template>
 
+  <xsl:template match="div|span">
+    <xsl:param name="level" select="'1'"/>
+    <xsl:param name="width"
+            select="$document-width - ($level * $indent-per-level)"/>
+    <xsl:apply-templates>
+      <xsl:with-param name="level" select="$level"/>
+      <xsl:with-param name="width" select="$width"/>
+    </xsl:apply-templates>
+  </xsl:template>
+
+  <xsl:template match="div|span" mode="in-list">
+    <xsl:param name="level" select="'1'"/>
+    <xsl:param name="width"
+            select="$document-width - ($level * $indent-per-level)"/>
+    <xsl:apply-templates mode="in-list">
+      <xsl:with-param name="level" select="$level"/>
+      <xsl:with-param name="width" select="$width"/>
+    </xsl:apply-templates>
+  </xsl:template>
+
   <xsl:template match="ol|ul">
     <xsl:param name="level" select="'1'"/>
     <xsl:param name="width"

Mime
View raw message