cvs: pear /MDB2_Schema/docs MDB.dtd MDB.xsl
| From: | Lukas Smith | Date: | Tue, 21 Feb 2006 22:20:34 +0000 |
| Subject: | cvs: pear /MDB2_Schema/docs MDB.dtd MDB.xsl | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-38474@lists.php.net to get a copy of this message | ||
lsmith Tue Feb 21 22:20:34 2006 UTC
Modified files:
/pear/MDB2_Schema/docs MDB.dtd MDB.xsl
Log:
- added autoincrement and primary (untested)
http://cvs.php.net/viewcvs.cgi/pear/MDB2_Schema/docs/MDB.dtd?r1=1.1&r2=1.2&diff_format=u
Index: pear/MDB2_Schema/docs/MDB.dtd
diff -u pear/MDB2_Schema/docs/MDB.dtd:1.1 pear/MDB2_Schema/docs/MDB.dtd:1.2
--- pear/MDB2_Schema/docs/MDB.dtd:1.1 Sun Apr 17 12:46:12 2005
+++ pear/MDB2_Schema/docs/MDB.dtd Tue Feb 21 22:20:34 2006
@@ -11,15 +11,17 @@
<!ELEMENT start (#PCDATA)>
<!ELEMENT type (#PCDATA)>
<!ELEMENT unique (#PCDATA)>
+<!ELEMENT primary (#PCDATA)>
+<!ELEMENT autoincrement (#PCDATA)>
<!ELEMENT unsigned (#PCDATA)>
<!ELEMENT value (#PCDATA)>
<!ELEMENT variable (#PCDATA)>
<!ELEMENT was (#PCDATA)>
<!ELEMENT database (name+ | create? | overwrite? | description? | comments? | table+ |
sequence?)*>
-<!ELEMENT field (#PCDATA | name | was | type | default | notnull | unsigned | description |
comments | length | sorting | value)*>
+<!ELEMENT field (#PCDATA | name | was | type | default | notnull | autoincrement | unsigned |
description | comments | length | sorting | value)*>
<!ELEMENT table (#PCDATA | name | was | description | comments | declaration |
initialization)*>
<!ELEMENT sequence (name+ | was? | start? | on+ | description? | comments?)*>
-<!ELEMENT index (name+ | was? | unique? | field+)>
+<!ELEMENT index (name+ | was? | unique? | primary? | field+)>
<!ELEMENT declaration (field+, index?)>
<!ELEMENT initialization (insert)>
<!ELEMENT insert (field+)>
http://cvs.php.net/viewcvs.cgi/pear/MDB2_Schema/docs/MDB.xsl?r1=1.1&r2=1.2&diff_format=u
Index: pear/MDB2_Schema/docs/MDB.xsl
diff -u pear/MDB2_Schema/docs/MDB.xsl:1.1 pear/MDB2_Schema/docs/MDB.xsl:1.2
--- pear/MDB2_Schema/docs/MDB.xsl:1.1 Sun Apr 17 12:46:12 2005
+++ pear/MDB2_Schema/docs/MDB.xsl Tue Feb 21 22:20:34 2006
@@ -1,6 +1,6 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
- @(#) $Id: MDB.xsl,v 1.1 2005/04/17 12:46:12 lsmith Exp $
+ @(#) $Id: MDB.xsl,v 1.2 2006/02/21 22:20:34 lsmith Exp $
-->
<xsl:template match="/">
<!-- -->
@@ -62,6 +62,12 @@
<xsl:for-each select="descendant::default"><xsl:call-template
name="showdefault"/>
</xsl:for-each>
+ <xsl:for-each select="descendant::autoincrement"><xsl:call-template
name="showautoincrement"/>
+ </xsl:for-each>
+
+ <xsl:for-each select="descendant::unsigned"><xsl:call-template
name="showunsigned"/>
+ </xsl:for-each>
+
<xsl:for-each select="descendant::notnull"><xsl:call-template
name="shownotnull"/>
</xsl:for-each>
@@ -71,6 +77,7 @@
<xsl:if test="$curfield=field/name">
<br/>index <xsl:value-of select="name"/>
<xsl:if test="unique"> unique</xsl:if>
+ <xsl:if test="primary"> primary</xsl:if>
</xsl:if>
</xsl:for-each>
@@ -87,6 +94,14 @@
default=<xsl:value-of select="//default"/>
</xsl:template>
+<xsl:template name="showautoincrement">
+ autoincrement=<xsl:value-of select="//autoincrement"/>
+</xsl:template>
+
+<xsl:template name="showunsigned">
+ unsigned=<xsl:value-of select="//unsigned"/>
+</xsl:template>
+
<xsl:template name="shownotnull">
notnull=<xsl:value-of select="//notnull"/>
</xsl:template>