<!-- ==================================================================== -->
<xsl:template match="segmentedlist">
- <xsl:apply-templates/>
+ <xsl:variable name="presentation">
+ <xsl:call-template name="pi-attribute">
+ <xsl:with-param name="pis"
+ select="processing-instruction('dbfo')"/>
+ <xsl:with-param name="attribute" select="'list-presentation'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$presentation = 'table'">
+ <xsl:apply-templates select="." mode="seglist-table"/>
+ </xsl:when>
+ <xsl:when test="$presentation = 'list'">
+ <xsl:apply-templates/>
+ </xsl:when>
+ <xsl:when test="$segmentedlist.as.table != 0">
+ <xsl:apply-templates select="." mode="seglist-table"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<xsl:template match="segmentedlist/title">
</fo:block>
</xsl:template>
+<xsl:template match="segmentedlist" mode="seglist-table">
+ <xsl:apply-templates select="title" mode="seglist-table"/>
+ <fo:table>
+ <fo:table-header>
+ <fo:table-row>
+ <xsl:apply-templates select="segtitle" mode="seglist-table"/>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-body>
+ <xsl:apply-templates select="seglistitem" mode="seglist-table"/>
+ </fo:table-body>
+ </fo:table>
+</xsl:template>
+
+<xsl:template match="segtitle" mode="seglist-table">
+ <fo:table-cell>
+ <fo:block>
+ <xsl:apply-templates/>
+ </fo:block>
+ </fo:table-cell>
+</xsl:template>
+
+<xsl:template match="seglistitem" mode="seglist-table">
+ <fo:table-row>
+ <xsl:apply-templates mode="seglist-table"/>
+ </fo:table-row>
+</xsl:template>
+
+<xsl:template match="seg" mode="seglist-table">
+ <fo:table-cell>
+ <fo:block>
+ <xsl:apply-templates/>
+ </fo:block>
+ </fo:table-cell>
+</xsl:template>
+
<!-- ==================================================================== -->
<xsl:template match="calloutlist">
<!ENTITY table.entry.padding SYSTEM "../params/table.entry.padding.xml">
<!ENTITY punct.honorific SYSTEM "../params/punct.honorific.xml">
+<!ENTITY segmentedlist.as.table SYSTEM "../params/segmentedlist.as.table.xml">
&table.border.color;
&title.margin.left;
&punct.honorific;
-
+&segmentedlist.as.table;
</reference>
<appendix><title>The Stylesheet</title>
<src:fragref linkend="table.border.color.frag"/>
<src:fragref linkend="title.margin.left.frag"/>
<src:fragref linkend="punct.honorific.frag"/>
-
+<src:fragref linkend="segmentedlist.as.table.frag"/>
</xsl:stylesheet>
</src:fragment>
<!-- ==================================================================== -->
<xsl:template match="segmentedlist">
+ <xsl:variable name="presentation">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis"
+ select="processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'list-presentation'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
<xsl:call-template name="anchor"/>
- <xsl:apply-templates/>
+
+ <xsl:choose>
+ <xsl:when test="$presentation = 'table'">
+ <xsl:apply-templates select="." mode="seglist-table"/>
+ </xsl:when>
+ <xsl:when test="$presentation = 'list'">
+ <xsl:apply-templates/>
+ </xsl:when>
+ <xsl:when test="$segmentedlist.as.table != 0">
+ <xsl:apply-templates select="." mode="seglist-table"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<xsl:template match="segmentedlist/title">
</p>
</xsl:template>
+<xsl:template match="segmentedlist" mode="seglist-table">
+ <xsl:variable name="table-summary">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis"
+ select="processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'table-summary'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="list-width">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis"
+ select="processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'list-width'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:apply-templates select="title" mode="seglist-table"/>
+ <table border="0">
+ <xsl:if test="$list-width != ''">
+ <xsl:attribute name="width">
+ <xsl:value-of select="$list-width"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="$table-summary != ''">
+ <xsl:attribute name="summary">
+ <xsl:value-of select="$table-summary"/>
+ </xsl:attribute>
+ </xsl:if>
+ <thead>
+ <tr>
+ <xsl:apply-templates select="segtitle" mode="seglist-table"/>
+ </tr>
+ </thead>
+ <tbody>
+ <xsl:apply-templates select="seglistitem" mode="seglist-table"/>
+ </tbody>
+ </table>
+</xsl:template>
+
+<xsl:template match="segtitle" mode="seglist-table">
+ <th><xsl:apply-templates/></th>
+</xsl:template>
+
+<xsl:template match="seglistitem" mode="seglist-table">
+ <tr>
+ <xsl:apply-templates mode="seglist-table"/>
+ </tr>
+</xsl:template>
+
+<xsl:template match="seg" mode="seglist-table">
+ <td><xsl:apply-templates/></td>
+</xsl:template>
+
<!-- ==================================================================== -->
<xsl:template match="calloutlist">
<!ENTITY htmlhelp.force.map.and.alias SYSTEM "../params/htmlhelp.force.map.and.alias.xml">
<!ENTITY htmlhelp.map.file SYSTEM "../params/htmlhelp.map.file.xml">
<!ENTITY htmlhelp.alias.file SYSTEM "../params/htmlhelp.alias.file.xml">
-
+<!ENTITY segmentedlist.as.table SYSTEM "../params/segmentedlist.as.table.xml">
&shade.verbatim;
&shade.verbatim.style;
&punct.honorific;
+&segmentedlist.as.table;
</reference>
<reference><title>Chunking</title>
<src:fragref linkend="htmlhelp.force.map.and.alias.frag"/>
<src:fragref linkend="htmlhelp.map.file.frag"/>
<src:fragref linkend="htmlhelp.alias.file.frag"/>
+<src:fragref linkend="segmentedlist.as.table.frag"/>
</xsl:stylesheet>
</src:fragment>
--- /dev/null
+<refentry id="segmentedlist.as.table">
+<refmeta>
+<refentrytitle>segmentedlist.as.table</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>segmentedlist.as.table</refname>
+<refpurpose>Format segmented lists as tables?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='segmentedlist.as.table.frag'>
+<xsl:param name="segmentedlist.as.table" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, <sgmltag>segmentedlist</sgmltag>s will be formatted as
+tables.</para>
+
+</refsect1>
+</refentry>