[yelp-xsl] [db2html-classsynopsis] Adding DocBook 5 support
- From: Shaun McCance <shaunm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp-xsl] [db2html-classsynopsis] Adding DocBook 5 support
- Date: Fri, 21 May 2010 23:31:52 +0000 (UTC)
commit aee1b90cc8c038164e0f6b3aff375e88dd066157
Author: brian m. carlson <sandals crustytoothpaste ath cx>
Date: Wed Mar 17 22:21:46 2010 +0000
[db2html-classsynopsis] Adding DocBook 5 support
Signed-off-by: brian m. carlson <sandals crustytoothpaste ath cx>
xslt/docbook/html/db2html-classsynopsis.xsl | 227 +++++++++++++++++----------
1 files changed, 146 insertions(+), 81 deletions(-)
---
diff --git a/xslt/docbook/html/db2html-classsynopsis.xsl b/xslt/docbook/html/db2html-classsynopsis.xsl
index 3359a0e..e9f6a45 100644
--- a/xslt/docbook/html/db2html-classsynopsis.xsl
+++ b/xslt/docbook/html/db2html-classsynopsis.xsl
@@ -17,6 +17,7 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:db="http://docbook.org/ns/docbook"
xmlns="http://www.w3.org/1999/xhtml"
version="1.0">
@@ -56,8 +57,10 @@ REMARK: Describe this param
<!-- = *synopsis = -->
<xsl:template match="
- classsynopsis | constructorsynopsis | fieldsynopsis |
- methodsynopsis | destructorsynopsis ">
+ classsynopsis | constructorsynopsis | fieldsynopsis |
+ methodsynopsis | destructorsynopsis |
+ db:classsynopsis | db:constructorsynopsis | db:fieldsynopsis |
+ db:methodsynopsis | db:destructorsynopsis |">
<xsl:variable name="language">
<xsl:choose>
<xsl:when test="@language">
@@ -70,10 +73,10 @@ REMARK: Describe this param
</xsl:variable>
<div>
<xsl:choose>
- <xsl:when test="@lang">
+ <xsl:when test="@lang | @xml:lang">
<xsl:attribute name="dir">
<xsl:call-template name="l10n.direction">
- <xsl:with-param name="lang" select="@lang"/>
+ <xsl:with-param name="lang" select="@lang | @xml:lang"/>
</xsl:call-template>
</xsl:attribute>
</xsl:when>
@@ -109,14 +112,14 @@ REMARK: Describe this param
</xsl:template>
<!-- = classsynopsisinfo = -->
-<xsl:template match="classsynopsisinfo">
+<xsl:template match="classsynopsisinfo | db:classsynopsisinfo">
<xsl:apply-templates/>
<!-- FIXME? -->
<xsl:text>
</xsl:text>
</xsl:template>
<!-- = methodparam = -->
-<xsl:template match="methodparam">
+<xsl:template match="methodparam | db:methodparam">
<span class="methodparam">
<xsl:for-each select="*">
<xsl:if test="position() != 1">
@@ -133,11 +136,16 @@ REMARK: Describe this param
<xsl:variable name="prec" select="self::*[../self::classsynopsis]/preceding-sibling::constructorsynopsis |
self::*[../self::classsynopsis]/preceding-sibling::destructorsynopsis |
self::*[../self::classsynopsis]/preceding-sibling::fieldsynopsis |
- self::*[../self::classsynopsis]/preceding-sibling::methodsynopsis "/>
+ self::*[../self::classsynopsis]/preceding-sibling::methodsynopsis |
+ self::*[../self::db:classsynopsis]/preceding-sibling::db:constructorsynopsis |
+ self::*[../self::db:classsynopsis]/preceding-sibling::db:destructorsynopsis |
+ self::*[../self::db:classsynopsis]/preceding-sibling::db:fieldsynopsis |
+ self::*[../self::db:classsynopsis]/preceding-sibling::db:methodsynopsis "/>
<xsl:choose>
- <xsl:when test="not($prec[modifier][last()][modifier[1] = current()/modifier[1]])">
+ <xsl:when test="not($prec[modifier][last()][modifier[1] = current()/modifier[1]]) and
+ not($prec[db:modifier][last()][db:modifier[1] = current()/db:modifier[1]])">
<xsl:if test="$prec"><xsl:text>
</xsl:text></xsl:if>
- <xsl:apply-templates select="modifier[1]"/>
+ <xsl:apply-templates select="(modifier | db:modifier)[1]"/>
<xsl:text>:
</xsl:text>
</xsl:when>
<xsl:when test="$prec and (name($prec[last()]) != name(.))">
@@ -157,7 +165,8 @@ REMARK: Describe this mode
</xsl:template>
<!-- = classsynopsis % db2html.class.cpp.mode = -->
-<xsl:template mode="db2html.class.cpp.mode" match="classsynopsis">
+<xsl:template mode="db2html.class.cpp.mode"
+ match="classsynopsis | db:classsynopsis">
<!-- classsynopsis = element classsynopsis {
attribute language { ... }?,
attribute class { ... }?,
@@ -169,17 +178,19 @@ REMARK: Describe this mode
-->
<xsl:if test="@class = 'class' or not(@class)">
<span class="ooclass">
- <xsl:for-each select="ooclass[1]/modifier">
+ <xsl:for-each select="ooclass[1]/modifier | db:ooclass[1]/db:modifier">
<xsl:apply-templates mode="db2html.class.cpp.mode" select="."/>
<xsl:text> </xsl:text>
</xsl:for-each>
<xsl:text>class </xsl:text>
<xsl:apply-templates mode="db2html.class.cpp.mode"
- select="ooclass[1]/classname"/>
+ select="ooclass[1]/classname |
+ db:ooclass[1]/db:classname"/>
</span>
- <xsl:if test="ooclass[2]">
+ <xsl:if test="ooclass[2] or db:ooclass[2]">
<xsl:text> : </xsl:text>
- <xsl:for-each select="ooclass[position() != 1]">
+ <xsl:for-each select="ooclass[position() != 1] |
+ db:ooclass[position() != 1]">
<xsl:if test="position() != 1">
<xsl:text>, </xsl:text>
</xsl:if>
@@ -189,15 +200,19 @@ REMARK: Describe this mode
<xsl:text>
{
</xsl:text>
<xsl:apply-templates mode="db2html.class.cpp.mode"
select="
- classsynopsisinfo |
- constructorsynopsis | destructorsynopsis |
- fieldsynopsis | methodsynopsis "/>
+ classsynopsisinfo |
+ constructorsynopsis | destructorsynopsis |
+ fieldsynopsis | methodsynopsis |
+ db:classsynopsisinfo |
+ db:constructorsynopsis | db:destructorsynopsis |
+ db:fieldsynopsis | db:methodsynopsis "/>
<xsl:text>}
</xsl:text>
</xsl:if>
</xsl:template>
<!-- = constructorsynopsis % db2html.class.cpp.mode = -->
-<xsl:template mode="db2html.class.cpp.mode" match="constructorsynopsis">
+<xsl:template mode="db2html.class.cpp.mode"
+ match="constructorsynopsis | db:constructorsynopsis">
<!-- constructorsynopsis = element constructorsynopsis {
attribute language { ... }?,
modifier+,
@@ -207,22 +222,28 @@ REMARK: Describe this mode
-->
<xsl:call-template name="db2html.class.cpp.modifier"/>
<xsl:value-of select="$cpp.tab"/>
- <xsl:for-each select="modifier[position() != 1]">
+ <xsl:for-each select="modifier[position() != 1] | db:modifier[position() != 1]">
<xsl:apply-templates mode="db2html.class.cpp.mode" select="."/>
<xsl:text> </xsl:text>
</xsl:for-each>
<xsl:choose>
- <xsl:when test="methodname">
- <xsl:apply-templates mode="db2html.class.cpp.mode" select="methodname"/>
+ <xsl:when test="methodname or db:methodname">
+ <xsl:apply-templates mode="db2html.class.cpp.mode"
+ select="methodname | db:methodname"/>
</xsl:when>
<xsl:when test="../self::classsynopsis[ooclass]">
<span class="methodname">
<xsl:value-of select="../ooclass/classname"/>
</span>
</xsl:when>
+ <xsl:when test="../self::db:classsynopsis[db:ooclass]">
+ <span class="methodname">
+ <xsl:value-of select="../db:ooclass/db:classname"/>
+ </span>
+ </xsl:when>
</xsl:choose>
<xsl:text>(</xsl:text>
- <xsl:for-each select="methodparam">
+ <xsl:for-each select="methodparam | db:methodparam">
<xsl:if test="position() != 1">
<xsl:text>, </xsl:text>
</xsl:if>
@@ -232,7 +253,8 @@ REMARK: Describe this mode
</xsl:template>
<!-- = destructorsynopsis % db2html.class.cpp.mode = -->
-<xsl:template mode="db2html.class.cpp.mode" match="destructorsynopsis">
+<xsl:template mode="db2html.class.cpp.mode"
+ match="destructorsynopsis | db:destructorsynopsis">
<!-- destructorsynopsis = element destructorsynopsis {
attribute language { ... }?,
modifier+,
@@ -242,13 +264,14 @@ REMARK: Describe this mode
-->
<xsl:call-template name="db2html.class.cpp.modifier"/>
<xsl:value-of select="$cpp.tab"/>
- <xsl:for-each select="modifier[position() != 1]">
+ <xsl:for-each select="modifier[position() != 1] | db:modifier[position() != 1]">
<xsl:apply-templates mode="db2html.class.cpp.mode" select="."/>
<xsl:text> </xsl:text>
</xsl:for-each>
<xsl:choose>
<xsl:when test="methodname">
- <xsl:apply-templates mode="db2html.class.cpp.mode" select="methodname"/>
+ <xsl:apply-templates mode="db2html.class.cpp.mode"
+ select="methodname | db:methodname"/>
</xsl:when>
<xsl:when test="../self::classsynopsis[ooclass]">
<span class="methodname">
@@ -256,9 +279,14 @@ REMARK: Describe this mode
<xsl:value-of select="../ooclass/classname"/>
</span>
</xsl:when>
+ <xsl:when test="../self::db:classsynopsis[db:ooclass]">
+ <span class="methodname">
+ <xsl:value-of select="../db:ooclass/db:classname"/>
+ </span>
+ </xsl:when>
</xsl:choose>
<xsl:text>(</xsl:text>
- <xsl:for-each select="methodparam">
+ <xsl:for-each select="methodparam | db:methodparam">
<!-- FIXME: should we do each methodparam on its own line? -->
<xsl:if test="position() != 1">
<xsl:text>, </xsl:text>
@@ -269,7 +297,8 @@ REMARK: Describe this mode
</xsl:template>
<!-- = fieldsynopsis % db2html.class.cpp.mode = -->
-<xsl:template mode="db2html.class.cpp.mode" match="fieldsynopsis">
+<xsl:template mode="db2html.class.cpp.mode"
+ match="fieldsynopsis | db:fieldsynopsis">
<!-- fieldsynopsis = element fieldsynopsis {
attribute language { ... }?,
modifier+,
@@ -280,30 +309,33 @@ REMARK: Describe this mode
-->
<xsl:call-template name="db2html.class.cpp.modifier"/>
<xsl:value-of select="$cpp.tab"/>
- <xsl:for-each select="modifier[position() != 1]">
+ <xsl:for-each select="modifier[position() != 1] | db:modifier[position() != 1]">
<xsl:apply-templates mode="db2html.class.cpp.mode" select="."/>
<xsl:text> </xsl:text>
</xsl:for-each>
- <xsl:if test="type">
- <xsl:apply-templates mode="db2html.class.cpp.mode" select="type"/>
+ <xsl:if test="type or db:type">
+ <xsl:apply-templates mode="db2html.class.cpp.mode" select="type | db:type"/>
<xsl:text> </xsl:text>
</xsl:if>
- <xsl:apply-templates mode="db2html.class.cpp.mode" select="varname"/>
- <xsl:if test="initializer">
+ <xsl:apply-templates mode="db2html.class.cpp.mode"
+ select="varname | db:varname"/>
+ <xsl:if test="initializer or db:initializer">
<xsl:text> = </xsl:text>
- <xsl:apply-templates mode="db2html.class.cpp.mode" select="initializer"/>
+ <xsl:apply-templates mode="db2html.class.cpp.mode"
+ select="initializer | db:initializer"/>
</xsl:if>
<xsl:text>;
</xsl:text>
</xsl:template>
<!-- = methodparam % db2html.class.cpp.mode = -->
-<xsl:template mode="db2html.class.cpp.mode" match="methodparam">
+<xsl:template mode="db2html.class.cpp.mode"
+ match="methodparam | db:methodparam">
<span class="methodparam">
<xsl:for-each select="*">
<xsl:if test="position() != 1">
<xsl:text> </xsl:text>
</xsl:if>
- <xsl:if test="self::initializer">
+ <xsl:if test="self::initializer or self::db:initializer">
<xsl:text>= </xsl:text>
</xsl:if>
<xsl:apply-templates mode="db2html.class.cpp.mode" select="."/>
@@ -312,7 +344,8 @@ REMARK: Describe this mode
</xsl:template>
<!-- = methodsynopsis % db2html.class.cpp.mode = -->
-<xsl:template mode="db2html.class.cpp.mode" match="methodsynopsis">
+<xsl:template mode="db2html.class.cpp.mode"
+ match="methodsynopsis | db:methodsynopsis">
<!-- methodsynopsis = element methodsynopsis {
attribute language { ... }?,
modifier+,
@@ -324,22 +357,27 @@ REMARK: Describe this mode
<xsl:call-template name="db2html.class.cpp.modifier"/>
<xsl:value-of select="$cpp.tab"/>
<!-- Parens for document order -->
- <xsl:for-each select="(methodname/preceding-sibling::modifier)[position() != 1]">
+ <xsl:for-each select="(methodname/preceding-sibling::modifier |
+ db:methodname/preceding-sibling::db:modifier)[position() != 1]">
<xsl:apply-templates mode="db2html.class.cpp.mode" select="."/>
<xsl:text> </xsl:text>
</xsl:for-each>
- <xsl:apply-templates mode="db2html.class.cpp.mode" select="type | methodname/preceding-sibling::void"/>
+ <xsl:apply-templates mode="db2html.class.cpp.mode"
+ select="type | methodname/preceding-sibling::void |
+ db:type | db:methodname/preceding-sibling::db:void"/>
<xsl:text> </xsl:text>
- <xsl:apply-templates mode="db2html.class.cpp.mode" select="methodname"/>
+ <xsl:apply-templates mode="db2html.class.cpp.mode"
+ select="methodname | db:methodname"/>
<xsl:text>(</xsl:text>
- <xsl:for-each select="methodparam">
+ <xsl:for-each select="methodparam | db:methodparam">
<xsl:if test="position() != 1">
<xsl:text>, </xsl:text>
</xsl:if>
<xsl:apply-templates mode="db2html.class.cpp.mode" select="."/>
</xsl:for-each>
<xsl:text>)</xsl:text>
- <xsl:for-each select="methodname/following-sibling::modifier">
+ <xsl:for-each select="methodname/following-sibling::modifier |
+ db:methodname/following-sibling::db:modifier">
<xsl:text> </xsl:text>
<xsl:apply-templates mode="db2html.class.cpp.mode" select="."/>
</xsl:for-each>
@@ -357,7 +395,8 @@ REMARK: Describe this mode
</xsl:template>
<!-- = classsynopsis % db2html.class.python.mode = -->
-<xsl:template mode="db2html.class.python.mode" match="classsynopsis">
+<xsl:template mode="db2html.class.python.mode"
+ match="classsynopsis | db:classsynopsis">
<!-- classsynopsis = element classsynopsis {
attribute language { ... }?,
attribute class { ... }?,
@@ -369,10 +408,11 @@ REMARK: Describe this mode
-->
<xsl:if test="@class = 'class' or not(@class)">
<xsl:text>class </xsl:text>
- <xsl:apply-templates mode="db2html.class.python.mode" select="ooclass[1]"/>
- <xsl:if test="ooclass[2]">
+ <xsl:apply-templates mode="db2html.class.python.mode"
+ select="ooclass[1] | db:ooclass[1]"/>
+ <xsl:if test="ooclass[2] or db:ooclass[2]">
<xsl:text>(</xsl:text>
- <xsl:for-each select="ooclass[position() != 1]">
+ <xsl:for-each select="(ooclass | db:ooclass)[position() != 1]">
<xsl:if test="position() != 1">
<xsl:text>, </xsl:text>
</xsl:if>
@@ -381,9 +421,12 @@ REMARK: Describe this mode
<xsl:text>)</xsl:text>
</xsl:if>
<xsl:text>:
</xsl:text>
- <xsl:for-each select="classsynopsisinfo | constructorsynopsis |
- destructorsynopsis | fieldsynopsis |
- methodsynopsis ">
+ <xsl:for-each select="classsynopsisinfo | constructorsynopsis |
+ destructorsynopsis | fieldsynopsis |
+ methodsynopsis |
+ db:classsynopsisinfo | db:constructorsynopsis |
+ db:destructorsynopsis | db:fieldsynopsis |
+ db:methodsynopsis ">
<xsl:apply-templates mode="db2html.class.python.mode" select="."/>
<xsl:if test="position() != last() and local-name(following-sibling::*[1]) != local-name(.)">
<xsl:text>
</xsl:text>
@@ -393,7 +436,8 @@ REMARK: Describe this mode
</xsl:template>
<!-- = constructorsynopsis % db2html.class.python.mode = -->
-<xsl:template mode="db2html.class.python.mode" match="constructorsynopsis">
+<xsl:template mode="db2html.class.python.mode"
+ match="constructorsynopsis | db:constructorsynopsis">
<!-- constructorsynopsis = element constructorsynopsis {
attribute language { ... }?,
modifier+,
@@ -402,11 +446,11 @@ REMARK: Describe this mode
}
-->
<xsl:variable name="tab">
- <xsl:if test="../self::classsynopsis">
+ <xsl:if test="../self::classsynopsis or ../self::db:classsynopsis">
<xsl:value-of select="$python.tab"/>
</xsl:if>
</xsl:variable>
- <xsl:for-each select="modifier">
+ <xsl:for-each select="modifier | db:modifier">
<xsl:value-of select="$tab"/>
<xsl:apply-templates mode="db2html.class.python.mode" select="."/>
<xsl:text>
</xsl:text>
@@ -416,29 +460,38 @@ REMARK: Describe this mode
<xsl:when test="methodname">
<xsl:apply-templates mode="db2html.class.python.mode" select="methodname"/>
</xsl:when>
+ <xsl:when test="db:methodname">
+ <xsl:apply-templates mode="db2html.class.python.mode" select="db:methodname"/>
+ </xsl:when>
<xsl:when test="../self::classsynopsis[ooclass]">
<span class="methodname">
<xsl:value-of select="../ooclass/classname"/>
</span>
</xsl:when>
+ <xsl:when test="../self::db:classsynopsis[db:ooclass]">
+ <span class="methodname">
+ <xsl:value-of select="../db:ooclass/db:classname"/>
+ </span>
+ </xsl:when>
</xsl:choose>
<xsl:text>(</xsl:text>
- <xsl:for-each select="methodparam">
+ <xsl:for-each select="methodparam | db:methodparam">
<xsl:if test="position() != 1">
<xsl:text>, </xsl:text>
</xsl:if>
<xsl:apply-templates mode="db2html.class.python.mode" select="."/>
</xsl:for-each>
<xsl:text>)</xsl:text>
- <xsl:if test="type">
+ <xsl:if test="type or db:type">
<xsl:text> -> </xsl:text>
- <xsl:apply-templates mode="db2html.class.python.mode" select="type"/>
+ <xsl:apply-templates mode="db2html.class.python.mode" select="type | db:type"/>
</xsl:if>
<xsl:text>
</xsl:text>
</xsl:template>
<!-- = destructorsynopsis % db2html.class.python.mode = -->
-<xsl:template mode="db2html.class.python.mode" match="destructorsynopsis">
+<xsl:template mode="db2html.class.python.mode"
+ match="destructorsynopsis | db:destructorsynopsis">
<!-- destructorsynopsis = element destructorsynopsis {
attribute language { ... }?,
modifier+,
@@ -447,11 +500,11 @@ REMARK: Describe this mode
}
-->
<xsl:variable name="tab">
- <xsl:if test="../self::classsynopsis">
+ <xsl:if test="../self::classsynopsis or ../self::db:classsynopsis">
<xsl:value-of select="$python.tab"/>
</xsl:if>
</xsl:variable>
- <xsl:for-each select="modifier">
+ <xsl:for-each select="modifier | db:modifier">
<xsl:value-of select="$tab"/>
<xsl:apply-templates mode="db2html.class.python.mode" select="."/>
<xsl:text>
</xsl:text>
@@ -461,6 +514,9 @@ REMARK: Describe this mode
<xsl:when test="methodname">
<xsl:apply-templates mode="db2html.class.python.mode" select="methodname"/>
</xsl:when>
+ <xsl:when test="db:methodname">
+ <xsl:apply-templates mode="db2html.class.python.mode" select="db:methodname"/>
+ </xsl:when>
<xsl:otherwise>
<span class="methodname">
<xsl:text>__del__</xsl:text>
@@ -468,22 +524,23 @@ REMARK: Describe this mode
</xsl:otherwise>
</xsl:choose>
<xsl:text>(</xsl:text>
- <xsl:for-each select="methodparam">
+ <xsl:for-each select="methodparam | db:methodparam">
<xsl:if test="position() != 1">
<xsl:text>, </xsl:text>
</xsl:if>
<xsl:apply-templates mode="db2html.class.python.mode" select="."/>
</xsl:for-each>
<xsl:text>)</xsl:text>
- <xsl:if test="type">
+ <xsl:if test="type or db:type">
<xsl:text> -> </xsl:text>
- <xsl:apply-templates mode="db2html.class.python.mode" select="type"/>
+ <xsl:apply-templates mode="db2html.class.python.mode" select="type | db:type"/>
</xsl:if>
<xsl:text>
</xsl:text>
</xsl:template>
<!-- = fieldsynopsis % db2html.class.python.mode = -->
-<xsl:template mode="db2html.class.python.mode" match="fieldsynopsis">
+<xsl:template mode="db2html.class.python.mode"
+ match="fieldsynopsis | db:fieldsynopsis">
<!-- fieldsynopsis = element fieldsynopsis {
attribute language { ... }?,
modifier+,
@@ -493,47 +550,54 @@ REMARK: Describe this mode
}
-->
<xsl:variable name="tab">
- <xsl:if test="../self::classsynopsis">
+ <xsl:if test="../self::classsynopsis or ../self::db:classsynopsis">
<xsl:value-of select="$python.tab"/>
</xsl:if>
</xsl:variable>
- <xsl:for-each select="modifier">
+ <xsl:for-each select="modifier | db:modifier">
<xsl:value-of select="$tab"/>
<xsl:apply-templates mode="db2html.class.python.mode" select="."/>
<xsl:text>
</xsl:text>
</xsl:for-each>
<xsl:value-of select="$tab"/>
- <xsl:apply-templates mode="db2html.class.python.mode" select="varname"/>
- <xsl:if test="initializer">
+ <xsl:apply-templates mode="db2html.class.python.mode"
+ select="varname | db:varname"/>
+ <xsl:if test="initializer or db:initializer">
<xsl:text>=</xsl:text>
- <xsl:apply-templates mode="db2html.class.python.mode" select="initializer"/>
+ <xsl:apply-templates mode="db2html.class.python.mode"
+ select="initializer | db:initializer"/>
</xsl:if>
<xsl:text>
</xsl:text>
</xsl:template>
<!-- = methodparam % db2html.class.python.mode = -->
-<xsl:template mode="db2html.class.python.mode" match="methodparam">
+<xsl:template mode="db2html.class.python.mode"
+ match="methodparam | db:methodparam">
<span class="methodparam">
- <xsl:apply-templates mode="db2html.class.python.mode" select="parameter"/>
- <xsl:if test="modifier or type">
+ <xsl:apply-templates mode="db2html.class.python.mode"
+ select="parameter | db:parameter"/>
+ <xsl:if test="modifier or type or db:modifier or db:type">
<xsl:text>: </xsl:text>
- <xsl:apply-templates mode="db2html.class.python.mode" select="(modifier | type)[1]"/>
- <xsl:if test="initializer">
+ <xsl:apply-templates mode="db2html.class.python.mode"
+ select="(modifier | type | db:modifier | db:type)[1]"/>
+ <xsl:if test="initializer or db:initializer">
<xsl:text> </xsl:text>
</xsl:if>
</xsl:if>
- <xsl:if test="initializer">
+ <xsl:if test="initializer or db:initializer">
<xsl:text>=</xsl:text>
- <xsl:if test="modifier or type">
+ <xsl:if test="modifier or type or db:modifier or db:type">
<xsl:text> </xsl:text>
</xsl:if>
- <xsl:apply-templates mode="db2html.class.python.mode" select="initializer"/>
+ <xsl:apply-templates mode="db2html.class.python.mode"
+ select="initializer | db:initializer"/>
</xsl:if>
</span>
</xsl:template>
<!-- = methodsynopsis % db2html.class.python.mode = -->
-<xsl:template mode="db2html.class.python.mode" match="methodsynopsis">
+<xsl:template mode="db2html.class.python.mode"
+ match="methodsynopsis | db:methodsynopsis">
<!-- methodsynopsis = element methodsynopsis {
attribute language { ... }?,
modifier+,
@@ -543,29 +607,30 @@ REMARK: Describe this mode
}
-->
<xsl:variable name="tab">
- <xsl:if test="../self::classsynopsis">
+ <xsl:if test="../self::classsynopsis or ../self::db:classsynopsis">
<xsl:value-of select="$python.tab"/>
</xsl:if>
</xsl:variable>
- <xsl:for-each select="modifier">
+ <xsl:for-each select="modifier | db:modifier">
<xsl:value-of select="$tab"/>
<xsl:apply-templates mode="db2html.class.python.mode" select="."/>
<xsl:text>
</xsl:text>
</xsl:for-each>
<xsl:value-of select="$tab"/>
<xsl:text>def </xsl:text>
- <xsl:apply-templates mode="db2html.class.python.mode" select="methodname"/>
+ <xsl:apply-templates mode="db2html.class.python.mode"
+ select="methodname | db:methodname"/>
<xsl:text>(</xsl:text>
- <xsl:for-each select="methodparam">
+ <xsl:for-each select="methodparam | db:methodparam">
<xsl:if test="position() != 1">
<xsl:text>, </xsl:text>
</xsl:if>
<xsl:apply-templates mode="db2html.class.python.mode" select="."/>
</xsl:for-each>
<xsl:text>)</xsl:text>
- <xsl:if test="type">
+ <xsl:if test="type or db:type">
<xsl:text> -> </xsl:text>
- <xsl:apply-templates mode="db2html.class.python.mode" select="type"/>
+ <xsl:apply-templates mode="db2html.class.python.mode" select="type | db:type"/>
</xsl:if>
<xsl:text>
</xsl:text>
</xsl:template>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]