cvs: peardoc /phd-db5-conversion db4-upgrade.xsl
| From: | Christian Weiske | Date: | Sat, 04 Oct 2008 12:43:22 +0000 |
| Subject: | cvs: peardoc /phd-db5-conversion db4-upgrade.xsl | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-11113@lists.php.net to get a copy of this message | ||
cweiske Sat Oct 4 12:43:22 2008 UTC
Modified files:
/peardoc/phd-db5-conversion db4-upgrade.xsl
Log:
convert <paramdef><parameter><optional> to <paramdef
choice="opt"><parameter>
automatically set choice="req" to non-optional paramdefs
http://cvs.php.net/viewvc.cgi/peardoc/phd-db5-conversion/db4-upgrade.xsl?r1=1.1&r2=1.2&diff_format=u
Index: peardoc/phd-db5-conversion/db4-upgrade.xsl
diff -u peardoc/phd-db5-conversion/db4-upgrade.xsl:1.1
peardoc/phd-db5-conversion/db4-upgrade.xsl:1.2
--- peardoc/phd-db5-conversion/db4-upgrade.xsl:1.1 Sat Oct 4 11:09:18 2008
+++ peardoc/phd-db5-conversion/db4-upgrade.xsl Sat Oct 4 12:43:22 2008
@@ -19,7 +19,7 @@
# value at all.
#
# Author: Norman Walsh, <ndw@nwalsh.com>
-# Release: $Id: db4-upgrade.xsl,v 1.1 2008/10/04 11:09:18 cweiske Exp $
+# Release: $Id: db4-upgrade.xsl,v 1.2 2008/10/04 12:43:22 cweiske Exp $
#
====================================================================== -->
@@ -997,4 +997,22 @@
<xsl:copy/>
</xsl:template>
+<xsl:template match="paramdef">
+ <paramdef>
+ <xsl:choose>
+ <xsl:when test="parameter/optional">
+ <xsl:attribute name="choice">opt</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="choice">req</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:apply-templates/>
+ </paramdef>
+</xsl:template>
+
+<xsl:template match="parameter/optional">
+ <xsl:apply-templates/>
+</xsl:template>
+
</xsl:stylesheet>