[richfaces-svn-commits] JBoss Rich Faces SVN: r4410 - trunk/docs/xslt/en/src/main/xslt.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Sat Dec 1 10:29:41 EST 2007


Author: vkorluzhenko
Date: 2007-12-01 10:29:41 -0500 (Sat, 01 Dec 2007)
New Revision: 4410

Modified:
   trunk/docs/xslt/en/src/main/xslt/html_chunk.xsl
Log:
http://jira.jboss.com/jira/browse/RF-1378 - Split components chapter

Modified: trunk/docs/xslt/en/src/main/xslt/html_chunk.xsl
===================================================================
--- trunk/docs/xslt/en/src/main/xslt/html_chunk.xsl	2007-12-01 15:29:07 UTC (rev 4409)
+++ trunk/docs/xslt/en/src/main/xslt/html_chunk.xsl	2007-12-01 15:29:41 UTC (rev 4410)
@@ -90,5 +90,94 @@
     <xsl:template match="section[@role = 'NotInToc']//*"  mode="toc" />
     <xsl:template match="chapter[@role = 'NotInToc']//section//*"  mode="toc" />
     <xsl:template match="book" mode="object.title.markup"/>
-    
+
+<!--###################################################
+                          Forse chunks
+    ################################################### -->   
+
+
+<xsl:template name="chunk">
+  <xsl:param name="node" select="."/>
+  
+  <xsl:choose>
+    <xsl:when test="not($node/parent::*)">1</xsl:when>
+    <xsl:when test="$node/parent::node()/processing-instruction('forseChanks')">1</xsl:when>
+    <xsl:when test="local-name($node) = 'sect1'
+                    and $chunk.section.depth &gt;= 1
+                    and ($chunk.first.sections != 0
+                         or count($node/preceding-sibling::sect1) &gt; 0)">
+      <xsl:text>1</xsl:text>
+    </xsl:when>
+    <xsl:when test="local-name($node) = 'sect2'
+                    and $chunk.section.depth &gt;= 2
+                    and ($chunk.first.sections != 0
+                         or count($node/preceding-sibling::sect2) &gt; 0)">
+      <xsl:call-template name="chunk">
+        <xsl:with-param name="node" select="$node/parent::*"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="local-name($node) = 'sect3'
+                    and $chunk.section.depth &gt;= 3
+                    and ($chunk.first.sections != 0
+                         or count($node/preceding-sibling::sect3) &gt; 0)">
+      <xsl:call-template name="chunk">
+        <xsl:with-param name="node" select="$node/parent::*"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="local-name($node) = 'sect4'
+                    and $chunk.section.depth &gt;= 4
+                    and ($chunk.first.sections != 0
+                         or count($node/preceding-sibling::sect4) &gt; 0)">
+      <xsl:call-template name="chunk">
+        <xsl:with-param name="node" select="$node/parent::*"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="local-name($node) = 'sect5'
+                    and $chunk.section.depth &gt;= 5
+                    and ($chunk.first.sections != 0
+                         or count($node/preceding-sibling::sect5) &gt; 0)">
+      <xsl:call-template name="chunk">
+        <xsl:with-param name="node" select="$node/parent::*"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="local-name($node) = 'section'
+                    and $chunk.section.depth &gt;= count($node/ancestor::section)+1
+                    and ($chunk.first.sections != 0
+                         or count($node/preceding-sibling::section) &gt; 0)">
+      <xsl:call-template name="chunk">
+        <xsl:with-param name="node" select="$node/parent::*"/>
+      </xsl:call-template>
+    </xsl:when>
+
+    <xsl:when test="local-name($node)='preface'">1</xsl:when>
+    <xsl:when test="local-name($node)='chapter'">1</xsl:when>
+    <xsl:when test="local-name($node)='appendix'">1</xsl:when>
+    <xsl:when test="local-name($node)='article'">1</xsl:when>
+    <xsl:when test="local-name($node)='part'">1</xsl:when>
+    <xsl:when test="local-name($node)='reference'">1</xsl:when>
+    <xsl:when test="local-name($node)='refentry'">1</xsl:when>
+    <xsl:when test="local-name($node)='index' and ($generate.index != 0 or count($node/*) > 0)
+                    and (local-name($node/parent::*) = 'article'
+                    or local-name($node/parent::*) = 'book'
+                    or local-name($node/parent::*) = 'part'
+                    )">1</xsl:when>
+    <xsl:when test="local-name($node)='bibliography'
+                    and (local-name($node/parent::*) = 'article'
+                    or local-name($node/parent::*) = 'book'
+                    or local-name($node/parent::*) = 'part'
+                    )">1</xsl:when>
+    <xsl:when test="local-name($node)='glossary'
+                    and (local-name($node/parent::*) = 'article'
+                    or local-name($node/parent::*) = 'book'
+                    or local-name($node/parent::*) = 'part'
+                    )">1</xsl:when>
+    <xsl:when test="local-name($node)='colophon'">1</xsl:when>
+    <xsl:when test="local-name($node)='book'">1</xsl:when>
+    <xsl:when test="local-name($node)='set'">1</xsl:when>
+    <xsl:when test="local-name($node)='setindex'">1</xsl:when>
+    <xsl:when test="local-name($node)='legalnotice'
+                    and $generate.legalnotice.link != 0">1</xsl:when>
+    <xsl:otherwise>0</xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
 </xsl:stylesheet>




More information about the richfaces-svn-commits mailing list