diff options
author | Shaun McCance <shaunm@src.gnome.org> | 2007-08-10 16:25:45 +0000 |
---|---|---|
committer | Shaun McCance <shaunm@src.gnome.org> | 2007-08-10 16:25:45 +0000 |
commit | 821f774e9dab9dd3bc81aaf8eca28c4281f12550 (patch) | |
tree | 90ef84da6ed69ca11473e3b01b6b545cde6d7ba4 /xslt/docbook/html/db2html-division.xsl | |
parent | 4ea90adf6ef272bb26ce444e5a2fdea400ad7c19 (diff) | |
download | yelp-xsl-821f774e9dab9dd3bc81aaf8eca28c4281f12550.tar.gz |
- Added missing ending brace to docs
* xslt/docbook/html/db2html-block.xsl:
- Added missing ending brace to docs
* xslt/docbook/html/db2html-division.xsl:
- Added callback parameter to db2html.division.div
* test/testbook/testbook.xml:
* xslt/docbook/common/db-title.xsl:
* xslt/docbook/common/db-xref.xsl:
* xslt/docbook/html/db2html-css.xsl:
* xslt/docbook/html/db2html-refentry.xsl:
- More consistent refentry output
svn path=/trunk/; revision=1011
Diffstat (limited to 'xslt/docbook/html/db2html-division.xsl')
-rw-r--r-- | xslt/docbook/html/db2html-division.xsl | 53 |
1 files changed, 38 insertions, 15 deletions
diff --git a/xslt/docbook/html/db2html-division.xsl b/xslt/docbook/html/db2html-division.xsl index 78127c30..f1fea2fe 100644 --- a/xslt/docbook/html/db2html-division.xsl +++ b/xslt/docbook/html/db2html-division.xsl @@ -256,6 +256,7 @@ $title_content: The title for divisions lacking a #{title} tag $subtitle_content: The subtitle for divisions lacking a #{subtitle} tag $entries: The entry-style child elements $divisions: The division-level child elements +$callback: Whether to process ${node} in %{db2html.division.div.content.mode} $depth_in_chunk: The depth of ${node} in the containing chunk $depth_of_chunk: The depth of the containing chunk in the document $chunk_divisions: Whether to create new documents for ${divisions} @@ -275,6 +276,7 @@ REMARK: Talk about some of the parameters <xsl:param name="subtitle_content"/> <xsl:param name="entries" select="/false"/> <xsl:param name="divisions" select="/false"/> + <xsl:param name="callback" select="false()"/> <xsl:param name="depth_in_chunk"> <xsl:call-template name="db.chunk.depth-in-chunk"> <xsl:with-param name="node" select="$node"/> @@ -313,21 +315,31 @@ REMARK: Talk about some of the parameters <xsl:with-param name="node" select="$node"/> </xsl:call-template> </xsl:if> - <xsl:variable name="nots" select="$divisions | $entries | $title_node | $subtitle_node"/> - <xsl:apply-templates select="*[not(set:has-same-node(., $nots))]"> - <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk + 1"/> - <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/> - </xsl:apply-templates> - <xsl:if test="$entries"> - <div class="block"> - <dl class="{local-name($node)}"> - <xsl:apply-templates select="$entries"> - <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk + 1"/> - <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/> - </xsl:apply-templates> - </dl> - </div> - </xsl:if> + <xsl:choose> + <xsl:when test="$callback"> + <xsl:apply-templates mode="db2html.division.div.content.mode" select="$node"> + <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/> + <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:variable name="nots" select="$divisions | $entries | $title_node | $subtitle_node"/> + <xsl:apply-templates select="*[not(set:has-same-node(., $nots))]"> + <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk + 1"/> + <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/> + </xsl:apply-templates> + <xsl:if test="$entries"> + <div class="block"> + <dl class="{local-name($node)}"> + <xsl:apply-templates select="$entries"> + <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk + 1"/> + <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/> + </xsl:apply-templates> + </dl> + </div> + </xsl:if> + </xsl:otherwise> + </xsl:choose> <xsl:if test="$autotoc_depth != 0"> <xsl:call-template name="db2html.autotoc"> <xsl:with-param name="node" select="$node"/> @@ -353,6 +365,17 @@ REMARK: Talk about some of the parameters </xsl:template> +<!--%%========================================================================== +db2html.division.div.content.mode +Renders the block-level content of a division element +$depth_in_chunk: The depth of the context element in the containing chunk +$depth_of_chunk: The depth of the containing chunk in the document + +REMARK: Talk about how this works with #{callback} +--> +<xsl:template mode="db2html.division.div.content.mode" match="*"/> + + <!--**========================================================================== db2html.header Generates a header with a title and optional subtitle |