]> granicus.if.org Git - docbook-dsssl/commitdiff
Add section.container.element parameter to enable
authorBob Stayton <bobs@sagehill.net>
Sun, 18 Mar 2007 07:42:45 +0000 (07:42 +0000)
committerBob Stayton <bobs@sagehill.net>
Sun, 18 Mar 2007 07:42:45 +0000 (07:42 +0000)
pgwide spans inside sections.

xsl/fo/param.ent
xsl/fo/param.xweb
xsl/fo/sections.xsl

index 449e7715ba4548090cf48e2c2f58f4f32c83ed4c..7edfe8be76a92f1f8b62506e6642434ce23cf705 100644 (file)
 <!ENTITY sans.font.family SYSTEM "../params/sans.font.family.xml">
 <!ENTITY section.autolabel SYSTEM "../params/section.autolabel.xml">
 <!ENTITY section.autolabel.max.depth SYSTEM "../params/section.autolabel.max.depth.xml">
+<!ENTITY section.container.element SYSTEM "../params/section.container.element.xml">
 <!ENTITY section.label.includes.component.label SYSTEM "../params/section.label.includes.component.label.xml">
 <!ENTITY section.title.properties SYSTEM "../params/section.title.properties.xml">
 <!ENTITY segmentedlist.as.table SYSTEM "../params/segmentedlist.as.table.xml">
index 17eab1e7d324849b2e29c1dc04640a2e9b202b42..8a8d8a433aa15afaadea3817d4e82b678359003d 100644 (file)
@@ -267,6 +267,7 @@ generate.section.toc.level;
 &highlight.source;
 &highlight.default.language;
 &email.delimiters.enabled;
+&section.container.element;
 </reference>
 
 <reference id="graphics"><title>Graphics</title>
@@ -793,6 +794,7 @@ around all these parameters.</para>
 <src:fragref linkend="sans.font.family.frag"/>
 <src:fragref linkend="section.autolabel.frag"/>
 <src:fragref linkend="section.autolabel.max.depth.frag"/>
+<src:fragref linkend="section.container.element.frag"/>
 <src:fragref linkend="section.label.includes.component.label.frag"/>
 <src:fragref linkend="section.title.level1.properties.frag"/>
 <src:fragref linkend="section.title.level2.properties.frag"/>
index 9213d2233152ce07159950d4717906b509f52567..32a4a02b3e4e0b1248919d35b277809e7061b10f 100644 (file)
       <!-- xsl:use-attribute-sets takes only a Qname, not a variable -->
       <xsl:choose>
         <xsl:when test="$level = 1">
-          <fo:block id="{$id}"
+          <xsl:element name="fo:{$section.container.element}"
                     xsl:use-attribute-sets="section.level1.properties">
+            <xsl:attribute name="id"><xsl:value-of 
+                                select="$id"/></xsl:attribute>
             <xsl:call-template name="section.content"/>
-          </fo:block>
+          </xsl:element>
         </xsl:when>
         <xsl:when test="$level = 2">
-          <fo:block id="{$id}"
+          <xsl:element name="fo:{$section.container.element}"
                     xsl:use-attribute-sets="section.level2.properties">
+            <xsl:attribute name="id"><xsl:value-of 
+                                select="$id"/></xsl:attribute>
             <xsl:call-template name="section.content"/>
-          </fo:block>
+          </xsl:element>
         </xsl:when>
         <xsl:when test="$level = 3">
-          <fo:block id="{$id}"
+          <xsl:element name="fo:{$section.container.element}"
                     xsl:use-attribute-sets="section.level3.properties">
+            <xsl:attribute name="id"><xsl:value-of 
+                                select="$id"/></xsl:attribute>
             <xsl:call-template name="section.content"/>
-          </fo:block>
+          </xsl:element>
         </xsl:when>
         <xsl:when test="$level = 4">
-          <fo:block id="{$id}"
+          <xsl:element name="fo:{$section.container.element}"
                     xsl:use-attribute-sets="section.level4.properties">
+            <xsl:attribute name="id"><xsl:value-of 
+                                select="$id"/></xsl:attribute>
             <xsl:call-template name="section.content"/>
-          </fo:block>
+          </xsl:element>
         </xsl:when>
         <xsl:when test="$level = 5">
-          <fo:block id="{$id}"
+          <xsl:element name="fo:{$section.container.element}"
                     xsl:use-attribute-sets="section.level5.properties">
+            <xsl:attribute name="id"><xsl:value-of 
+                                select="$id"/></xsl:attribute>
             <xsl:call-template name="section.content"/>
-          </fo:block>
+          </xsl:element>
         </xsl:when>
         <xsl:otherwise>
-          <fo:block id="{$id}"
+          <xsl:element name="fo:{$section.container.element}"
                     xsl:use-attribute-sets="section.level6.properties">
+            <xsl:attribute name="id"><xsl:value-of 
+                                select="$id"/></xsl:attribute>
             <xsl:call-template name="section.content"/>
-          </fo:block>
+          </xsl:element>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:otherwise>
     <xsl:call-template name="object.id"/>
   </xsl:variable>
 
-  <fo:block id="{$id}" 
+  <xsl:element name="fo:{$section.container.element}"
             xsl:use-attribute-sets="section.level1.properties">
+    <xsl:attribute name="id"><xsl:value-of 
+                        select="$id"/></xsl:attribute>
     <xsl:call-template name="sect1.titlepage"/>
 
     <xsl:variable name="toc.params">
     </xsl:if>
 
     <xsl:apply-templates/>
-  </fo:block>
+  </xsl:element>
 </xsl:template>
 
 <xsl:template match="/sect1">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
 
-  <fo:block id="{$id}" 
+  <xsl:element name="fo:{$section.container.element}"
             xsl:use-attribute-sets="section.level2.properties">
+    <xsl:attribute name="id"><xsl:value-of 
+                        select="$id"/></xsl:attribute>
     <xsl:call-template name="sect2.titlepage"/>
 
     <xsl:variable name="toc.params">
     </xsl:if>
 
     <xsl:apply-templates/>
-  </fo:block>
+  </xsl:element>
 </xsl:template>
 
 <xsl:template match="sect3">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
 
-  <fo:block id="{$id}" 
+  <xsl:element name="fo:{$section.container.element}"
             xsl:use-attribute-sets="section.level3.properties">
+    <xsl:attribute name="id"><xsl:value-of 
+                        select="$id"/></xsl:attribute>
     <xsl:call-template name="sect3.titlepage"/>
 
     <xsl:variable name="toc.params">
     </xsl:if>
 
     <xsl:apply-templates/>
-  </fo:block>
+  </xsl:element>
 </xsl:template>
 
 <xsl:template match="sect4">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
 
-  <fo:block id="{$id}" 
+  <xsl:element name="fo:{$section.container.element}"
             xsl:use-attribute-sets="section.level4.properties">
+    <xsl:attribute name="id"><xsl:value-of 
+                        select="$id"/></xsl:attribute>
     <xsl:call-template name="sect4.titlepage"/>
 
     <xsl:variable name="toc.params">
     </xsl:if>
 
     <xsl:apply-templates/>
-  </fo:block>
+  </xsl:element>
 </xsl:template>
 
 <xsl:template match="sect5">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
 
-  <fo:block id="{$id}" 
+  <xsl:element name="fo:{$section.container.element}"
             xsl:use-attribute-sets="section.level5.properties">
+    <xsl:attribute name="id"><xsl:value-of 
+                        select="$id"/></xsl:attribute>
     <xsl:call-template name="sect5.titlepage"/>
 
     <xsl:variable name="toc.params">
     </xsl:if>
 
     <xsl:apply-templates/>
-  </fo:block>
+  </xsl:element>
 </xsl:template>
 
 <xsl:template match="simplesect">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
 
-  <fo:block id="{$id}">
+  <xsl:element name="fo:{$section.container.element}">
+    <xsl:attribute name="id"><xsl:value-of 
+                        select="$id"/></xsl:attribute>
     <xsl:call-template name="simplesect.titlepage"/>
     <xsl:apply-templates/>
-  </fo:block>
+  </xsl:element>
 </xsl:template>
 
 <xsl:template match="sectioninfo"></xsl:template>