cvs: pear /DB_DataObject/docs/dia README dia-dbo.xsl dia-html-edit.xsl dia-sql.xsl stylesheets.xml
| From: | Alan Knowles | Date: | Thu, 09 Sep 2004 08:48:24 +0000 |
| Subject: | cvs: pear /DB_DataObject/docs/dia README dia-dbo.xsl dia-html-edit.xsl dia-sql.xsl stylesheets.xml | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-23746@lists.php.net to get a copy of this message | ||
alan_k Thu Sep 9 04:48:24 2004 EDT
Added files:
/pear/DB_DataObject/docs/dia README dia-dbo.xsl dia-html-edit.xsl
dia-sql.xsl stylesheets.xml
Log:
adding dia tools by J llarens
http://cvs.php.net/co.php/pear/DB_DataObject/docs/dia/dia-dbo.xsl?r=1.1&p=1 Index: pear/DB_DataObject/docs/dia/dia-dbo.xsl +++ pear/DB_DataObject/docs/dia/dia-dbo.xsl <?xml version="1.0"?> <!-- Transform dia UML objects to PHP 4.x classes Copyright(c) 2002 Matthieu Sozeau <mattam@netcourrier.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="text"/> <xsl:param name="directory"/> <xsl:param name="ident"> <xsl:text> </xsl:text> </xsl:param> <!-- Visibility indentation --> <xsl:param name="visident"> <xsl:text> </xsl:text> </xsl:param> <xsl:template match="class"> <xsl:text>[</xsl:text><xsl:value-of select="@name"/><xsl:text>]
</xsl:text> <xsl:for-each select="attribute"> <xsl:value-of select="name"/> <xsl:text> = </xsl:text> <xsl:value-of select="type"/> </xsl:for-each> <xsl:text>
</xsl:text> <xsl:document href="{$directory}{@name}.php" method="text"> <xsl:if test="comment"> <xsl:text>/* 
 </xsl:text> <xsl:value-of select="comment"/> <xsl:text>
 */

</xsl:text> </xsl:if> <xsl:text>class </xsl:text> <xsl:value-of select="@name"/> <xsl:if test="@stereotype!=''"> <xsl:text> : public </xsl:text> <xsl:value-of select="@stereotype"/> </xsl:if> <xsl:text> extends DB_DataObject {

</xsl:text> <xsl:text>var $__table ='</xsl:text><xsl:value-of select="@name"/> <xsl:text>';

</xsl:text> <xsl:apply-templates select="attributes"/> <xsl:text>
</xsl:text> <xsl:apply-templates select="operations"/> <!-- funciones que siempre se agregan --> <xsl:text>
function __clone() { return $this;}
</xsl:text> <xsl:text>
function staticGet($k,$v=null) { return DB_DataObject::staticGet('</xsl:text> <xsl:value-of select="@name"/> <xsl:text>',$k,$v);}
</xsl:text> <xsl:text>
};
</xsl:text> </xsl:document> </xsl:template> <xsl:template match="operations|attributes"> <xsl:if test="*[@visibility='private']"> <xsl:value-of select="$visident"/> <xsl:text>private:
</xsl:text> <xsl:apply-templates select="*[@visibility='private']"/> <xsl:text>
</xsl:text> </xsl:if> <xsl:if test="*[@visibility='protected']"> <xsl:value-of select="$visident"/> <xsl:text>protected:
</xsl:text> <xsl:apply-templates select="*[@visibility='protected']"/> <xsl:text>
</xsl:text> </xsl:if> <xsl:if test="*[@visibility='public']"> <xsl:value-of select="$visident"/> <xsl:apply-templates select="*[@visibility='public']"/> <xsl:text>
</xsl:text> </xsl:if> <xsl:if test="*[not(@visibility)]"> <xsl:apply-templates select="*[not(@visibility)]"/> <xsl:text>
</xsl:text> </xsl:if> </xsl:template> <xsl:template match="attribute"> <xsl:value-of select="$ident"/> <xsl:text>var $</xsl:text> <xsl:value-of select="name"/> <xsl:text>; //</xsl:text> <xsl:value-of select="type"/> <xsl:text>
</xsl:text> </xsl:template> <xsl:template match="operation"> <xsl:if test="comment!=''"> <xsl:text>
</xsl:text> <xsl:value-of select="$ident"/> <xsl:text>/*
</xsl:text> <xsl:value-of select="$ident"/> <xsl:text> * </xsl:text> <xsl:value-of select="comment"/> <xsl:text>
</xsl:text> <xsl:for-each select="parameters/parameter/comment"> <xsl:value-of select="$ident"/> <xsl:text> * @</xsl:text> <xsl:value-of select="../name"/> <xsl:text>
</xsl:text> </xsl:for-each> <xsl:value-of select="$ident"/> <xsl:text> */

</xsl:text> </xsl:if> <xsl:value-of select="$ident"/> <xsl:choose> <xsl:when test="@inheritance='polymorphic'"> <xsl:text>virtual </xsl:text> </xsl:when> <xsl:when test="@inheritance='abstract'"> <xsl:text>virtual </xsl:text> </xsl:when> </xsl:choose> <xsl:if test="@class_scope"> <xsl:text>static </xsl:text> </xsl:if> <!-- Constructor has no type --> <xsl:if test="type"> <xsl:value-of select="type"/> <xsl:text> </xsl:text> </xsl:if> <xsl:value-of select="name"/> <xsl:text>(</xsl:text> <xsl:for-each select="parameters/*"> <xsl:choose> <xsl:when test="@kind='in'"> <xsl:text>const </xsl:text> </xsl:when> </xsl:choose> <xsl:value-of select="type"/> <xsl:if test="@kind"> <xsl:text>&</xsl:text> </xsl:if> <xsl:text> </xsl:text> <xsl:value-of select="name"/> <xsl:if test="value"> <xsl:text> = </xsl:text> <xsl:value-of select="value"/> </xsl:if> <xsl:if test="not(position()=last())"> <xsl:text>, </xsl:text> </xsl:if> </xsl:for-each> <xsl:text>)</xsl:text> <xsl:if test="@inheritance='abstract'"> <xsl:text> = 0</xsl:text> </xsl:if> <xsl:if test="@query=1"> <xsl:text> const</xsl:text> </xsl:if> <xsl:text>;
</xsl:text> </xsl:template> <xsl:template match="text()"> </xsl:template> <xsl:template match="node()|@*"> <xsl:apply-templates match="node()|@*"/> </xsl:template> </xsl:stylesheet> <!-- Keep this comment at the end of the file Local variables: mode: xml sgml-omittag:nil sgml-shorttag:nil sgml-namecase-general:nil sgml-general-insert-case:lower sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:2 sgml-indent-data:t sgml-parent-document:nil sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: --> http://cvs.php.net/co.php/pear/DB_DataObject/docs/dia/dia-html-edit.xsl?r=1.1&p=1 Index: pear/DB_DataObject/docs/dia/dia-html-edit.xsl +++ pear/DB_DataObject/docs/dia/dia-html-edit.xsl <?xml version="1.0"?> <!-- Transform dia UML objects to PHP 4.x classes Copyright(c) 2002 Matthieu Sozeau <mattam@netcourrier.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="text"/> <xsl:param name="directory"/> <xsl:param name="ident"> <xsl:text> </xsl:text> </xsl:param> <!-- Visibility indentation --> <xsl:param name="visident"> <xsl:text> </xsl:text> </xsl:param> <xsl:template match="class"> <xsl:text>[</xsl:text><xsl:value-of select="@name"/><xsl:text>]
</xsl:text> <xsl:for-each select="attribute"> <xsl:value-of select="name"/> <xsl:text> = </xsl:text> <xsl:value-of select="type"/> </xsl:for-each> <xsl:text>
</xsl:text> <xsl:document href="{$directory}{@name}.php" method="text"> <xsl:text>< form action ='</xsl:text> <xsl:value-of select="substring(@name,1,3)"/> <xsl:text>frmval.php' name='</xsl:text> <xsl:value-of select="substring(@name,1,3)"/> <xsl:text>frm.php' id='</xsl:text> <xsl:value-of select="substring(@name,1,3)"/> <xsl:text>'>
</xsl:text> <!-- falta hidden PHPSESSID --> <xsl:text><input name='_qf__</xsl:text> <xsl:value-of select="substring(@name,1,3)"/> <xsl:text>frm' type='hidden' value=''></xsl:text> <xsl:text>
<input name='ins' type='hidden' value=''/></xsl:text> <xsl:text>
</xsl:text> <xsl:apply-templates select="attributes"/> <xsl:text><tr><td align='right' valign='top'></td>
</xsl:text> <xsl:text><td valign='top' align='left'><input name='boton' value='Ok' type='submit'/></td></tr></xsl:text> </xsl:document> </xsl:template> <xsl:template match="attribute"> <xsl:text><tr><td align='right' valign='top'></xsl:text> <xsl:value-of select="name"/> <xsl:text></td>
<td align='left' valign='top'><input type='text' name='</xsl:text> <xsl:value-of select="name"/><xsl:text>'/></td></tr>
</xsl:text> </xsl:template> </xsl:stylesheet> <!-- Keep this comment at the end of the file Local variables: mode: xml sgml-omittag:nil sgml-shorttag:nil sgml-namecase-general:nil sgml-general-insert-case:lower sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:2 sgml-indent-data:t sgml-parent-document:nil sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: --> http://cvs.php.net/co.php/pear/DB_DataObject/docs/dia/dia-sql.xsl?r=1.1&p=1 Index: pear/DB_DataObject/docs/dia/dia-sql.xsl +++ pear/DB_DataObject/docs/dia/dia-sql.xsl <?xml version="1.0"?> <!-- Transform dia UML objects to C++ classes Copyright(c) 2002 Matthieu Sozeau <mattam@netcourrier.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="text"/> <xsl:param name="directory"/> <xsl:param name="ident"> <xsl:text> </xsl:text> </xsl:param> <!-- Visibility indentation --> <xsl:param name="visident"> <xsl:text> </xsl:text> </xsl:param> <xsl:template match="class"> <xsl:if test="comment"> <xsl:text>/* 
 </xsl:text> <xsl:value-of select="comment"/> <xsl:text>
 */

</xsl:text> </xsl:if> <xsl:text>create table </xsl:text><xsl:value-of select="@name"/><xsl:text> (
 </xsl:text> <xsl:apply-templates select="attributes"/> <xsl:text>
</xsl:text> <xsl:apply-templates select="operations"/> <xsl:text>
);
</xsl:text> </xsl:template> <xsl:template match="attribute"> <xsl:value-of select="$ident"/> <xsl:value-of select="name"/> <xsl:text> </xsl:text> <xsl:value-of select="type"/> <!-- <xsl:if test="not(position()=last())"> --> <xsl:text>, </xsl:text> <!-- </xsl:if> --> <xsl:text>
</xsl:text> </xsl:template> <xsl:template match="operation"> <xsl:value-of select="$ident"/> <!-- Constructor has no type --> <xsl:if test="type"> <xsl:value-of select="type"/> <xsl:text> </xsl:text> </xsl:if> <xsl:value-of select="name"/> <xsl:text>(</xsl:text> <xsl:for-each select="parameters/*"> <xsl:value-of select="type"/> <xsl:if test="@kind"> <xsl:text>&</xsl:text> </xsl:if> <xsl:text> </xsl:text> <xsl:value-of select="name"/> <xsl:if test="value"> <xsl:text> = </xsl:text> <xsl:value-of select="value"/> </xsl:if> <xsl:if test="not(position()=last())"> <xsl:text>, </xsl:text> </xsl:if> </xsl:for-each> <xsl:text>)</xsl:text> <xsl:if test="not(position()=last())"> <xsl:text>,
</xsl:text> </xsl:if> </xsl:template> <xsl:template match="text()"> </xsl:template> <xsl:template match="node()|@*"> <xsl:apply-templates match="node()|@*"/> </xsl:template> </xsl:stylesheet> <!-- Keep this comment at the end of the file Local variables: mode: xml sgml-omittag:nil sgml-shorttag:nil sgml-namecase-general:nil sgml-general-insert-case:lower sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:2 sgml-indent-data:t sgml-parent-document:nil sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: --> http://cvs.php.net/co.php/pear/DB_DataObject/docs/dia/stylesheets.xml?r=1.1&p=1 Index: pear/DB_DataObject/docs/dia/stylesheets.xml +++ pear/DB_DataObject/docs/dia/stylesheets.xml <?xml version="1.0"?> <config> <language name="UML" stylesheet="/usr/share/dia/plugins/xslt/dia-uml.xsl"> <implementation name="htmlform" stylesheet="/usr/share/dia/plugins/xslt/dia-html-edit.xsl"/> <implementation name="dbo" stylesheet="/usr/share/dia/plugins/xslt/dia-dbo.xsl"/> <implementation name="sql" stylesheet="/usr/share/dia/plugins/xslt/dia-sql.xsl"/> <implementation name="C++" stylesheet="/usr/share/dia/plugins/xslt/dia-uml2c++.xsl"/> <implementation name="Java" stylesheet="/usr/share/dia/plugins/xslt/dia-uml2java.xsl"/> <implementation name="IDL" stylesheet="/usr/share/dia/plugins/xslt/dia-uml2idl.xsl"/> </language> </config>
http://cvs.php.net/co.php/pear/DB_DataObject/docs/dia/dia-dbo.xsl?r=1.1&p=1 Index: pear/DB_DataObject/docs/dia/dia-dbo.xsl +++ pear/DB_DataObject/docs/dia/dia-dbo.xsl <?xml version="1.0"?> <!-- Transform dia UML objects to PHP 4.x classes Copyright(c) 2002 Matthieu Sozeau <mattam@netcourrier.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="text"/> <xsl:param name="directory"/> <xsl:param name="ident"> <xsl:text> </xsl:text> </xsl:param> <!-- Visibility indentation --> <xsl:param name="visident"> <xsl:text> </xsl:text> </xsl:param> <xsl:template match="class"> <xsl:text>[</xsl:text><xsl:value-of select="@name"/><xsl:text>]
</xsl:text> <xsl:for-each select="attribute"> <xsl:value-of select="name"/> <xsl:text> = </xsl:text> <xsl:value-of select="type"/> </xsl:for-each> <xsl:text>
</xsl:text> <xsl:document href="{$directory}{@name}.php" method="text"> <xsl:if test="comment"> <xsl:text>/* 
 </xsl:text> <xsl:value-of select="comment"/> <xsl:text>
 */

</xsl:text> </xsl:if> <xsl:text>class </xsl:text> <xsl:value-of select="@name"/> <xsl:if test="@stereotype!=''"> <xsl:text> : public </xsl:text> <xsl:value-of select="@stereotype"/> </xsl:if> <xsl:text> extends DB_DataObject {

</xsl:text> <xsl:text>var $__table ='</xsl:text><xsl:value-of select="@name"/> <xsl:text>';

</xsl:text> <xsl:apply-templates select="attributes"/> <xsl:text>
</xsl:text> <xsl:apply-templates select="operations"/> <!-- funciones que siempre se agregan --> <xsl:text>
function __clone() { return $this;}
</xsl:text> <xsl:text>
function staticGet($k,$v=null) { return DB_DataObject::staticGet('</xsl:text> <xsl:value-of select="@name"/> <xsl:text>',$k,$v);}
</xsl:text> <xsl:text>
};
</xsl:text> </xsl:document> </xsl:template> <xsl:template match="operations|attributes"> <xsl:if test="*[@visibility='private']"> <xsl:value-of select="$visident"/> <xsl:text>private:
</xsl:text> <xsl:apply-templates select="*[@visibility='private']"/> <xsl:text>
</xsl:text> </xsl:if> <xsl:if test="*[@visibility='protected']"> <xsl:value-of select="$visident"/> <xsl:text>protected:
</xsl:text> <xsl:apply-templates select="*[@visibility='protected']"/> <xsl:text>
</xsl:text> </xsl:if> <xsl:if test="*[@visibility='public']"> <xsl:value-of select="$visident"/> <xsl:apply-templates select="*[@visibility='public']"/> <xsl:text>
</xsl:text> </xsl:if> <xsl:if test="*[not(@visibility)]"> <xsl:apply-templates select="*[not(@visibility)]"/> <xsl:text>
</xsl:text> </xsl:if> </xsl:template> <xsl:template match="attribute"> <xsl:value-of select="$ident"/> <xsl:text>var $</xsl:text> <xsl:value-of select="name"/> <xsl:text>; //</xsl:text> <xsl:value-of select="type"/> <xsl:text>
</xsl:text> </xsl:template> <xsl:template match="operation"> <xsl:if test="comment!=''"> <xsl:text>
</xsl:text> <xsl:value-of select="$ident"/> <xsl:text>/*
</xsl:text> <xsl:value-of select="$ident"/> <xsl:text> * </xsl:text> <xsl:value-of select="comment"/> <xsl:text>
</xsl:text> <xsl:for-each select="parameters/parameter/comment"> <xsl:value-of select="$ident"/> <xsl:text> * @</xsl:text> <xsl:value-of select="../name"/> <xsl:text>
</xsl:text> </xsl:for-each> <xsl:value-of select="$ident"/> <xsl:text> */

</xsl:text> </xsl:if> <xsl:value-of select="$ident"/> <xsl:choose> <xsl:when test="@inheritance='polymorphic'"> <xsl:text>virtual </xsl:text> </xsl:when> <xsl:when test="@inheritance='abstract'"> <xsl:text>virtual </xsl:text> </xsl:when> </xsl:choose> <xsl:if test="@class_scope"> <xsl:text>static </xsl:text> </xsl:if> <!-- Constructor has no type --> <xsl:if test="type"> <xsl:value-of select="type"/> <xsl:text> </xsl:text> </xsl:if> <xsl:value-of select="name"/> <xsl:text>(</xsl:text> <xsl:for-each select="parameters/*"> <xsl:choose> <xsl:when test="@kind='in'"> <xsl:text>const </xsl:text> </xsl:when> </xsl:choose> <xsl:value-of select="type"/> <xsl:if test="@kind"> <xsl:text>&</xsl:text> </xsl:if> <xsl:text> </xsl:text> <xsl:value-of select="name"/> <xsl:if test="value"> <xsl:text> = </xsl:text> <xsl:value-of select="value"/> </xsl:if> <xsl:if test="not(position()=last())"> <xsl:text>, </xsl:text> </xsl:if> </xsl:for-each> <xsl:text>)</xsl:text> <xsl:if test="@inheritance='abstract'"> <xsl:text> = 0</xsl:text> </xsl:if> <xsl:if test="@query=1"> <xsl:text> const</xsl:text> </xsl:if> <xsl:text>;
</xsl:text> </xsl:template> <xsl:template match="text()"> </xsl:template> <xsl:template match="node()|@*"> <xsl:apply-templates match="node()|@*"/> </xsl:template> </xsl:stylesheet> <!-- Keep this comment at the end of the file Local variables: mode: xml sgml-omittag:nil sgml-shorttag:nil sgml-namecase-general:nil sgml-general-insert-case:lower sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:2 sgml-indent-data:t sgml-parent-document:nil sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: --> http://cvs.php.net/co.php/pear/DB_DataObject/docs/dia/dia-html-edit.xsl?r=1.1&p=1 Index: pear/DB_DataObject/docs/dia/dia-html-edit.xsl +++ pear/DB_DataObject/docs/dia/dia-html-edit.xsl <?xml version="1.0"?> <!-- Transform dia UML objects to PHP 4.x classes Copyright(c) 2002 Matthieu Sozeau <mattam@netcourrier.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="text"/> <xsl:param name="directory"/> <xsl:param name="ident"> <xsl:text> </xsl:text> </xsl:param> <!-- Visibility indentation --> <xsl:param name="visident"> <xsl:text> </xsl:text> </xsl:param> <xsl:template match="class"> <xsl:text>[</xsl:text><xsl:value-of select="@name"/><xsl:text>]
</xsl:text> <xsl:for-each select="attribute"> <xsl:value-of select="name"/> <xsl:text> = </xsl:text> <xsl:value-of select="type"/> </xsl:for-each> <xsl:text>
</xsl:text> <xsl:document href="{$directory}{@name}.php" method="text"> <xsl:text>< form action ='</xsl:text> <xsl:value-of select="substring(@name,1,3)"/> <xsl:text>frmval.php' name='</xsl:text> <xsl:value-of select="substring(@name,1,3)"/> <xsl:text>frm.php' id='</xsl:text> <xsl:value-of select="substring(@name,1,3)"/> <xsl:text>'>
</xsl:text> <!-- falta hidden PHPSESSID --> <xsl:text><input name='_qf__</xsl:text> <xsl:value-of select="substring(@name,1,3)"/> <xsl:text>frm' type='hidden' value=''></xsl:text> <xsl:text>
<input name='ins' type='hidden' value=''/></xsl:text> <xsl:text>
</xsl:text> <xsl:apply-templates select="attributes"/> <xsl:text><tr><td align='right' valign='top'></td>
</xsl:text> <xsl:text><td valign='top' align='left'><input name='boton' value='Ok' type='submit'/></td></tr></xsl:text> </xsl:document> </xsl:template> <xsl:template match="attribute"> <xsl:text><tr><td align='right' valign='top'></xsl:text> <xsl:value-of select="name"/> <xsl:text></td>
<td align='left' valign='top'><input type='text' name='</xsl:text> <xsl:value-of select="name"/><xsl:text>'/></td></tr>
</xsl:text> </xsl:template> </xsl:stylesheet> <!-- Keep this comment at the end of the file Local variables: mode: xml sgml-omittag:nil sgml-shorttag:nil sgml-namecase-general:nil sgml-general-insert-case:lower sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:2 sgml-indent-data:t sgml-parent-document:nil sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: --> http://cvs.php.net/co.php/pear/DB_DataObject/docs/dia/dia-sql.xsl?r=1.1&p=1 Index: pear/DB_DataObject/docs/dia/dia-sql.xsl +++ pear/DB_DataObject/docs/dia/dia-sql.xsl <?xml version="1.0"?> <!-- Transform dia UML objects to C++ classes Copyright(c) 2002 Matthieu Sozeau <mattam@netcourrier.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="text"/> <xsl:param name="directory"/> <xsl:param name="ident"> <xsl:text> </xsl:text> </xsl:param> <!-- Visibility indentation --> <xsl:param name="visident"> <xsl:text> </xsl:text> </xsl:param> <xsl:template match="class"> <xsl:if test="comment"> <xsl:text>/* 
 </xsl:text> <xsl:value-of select="comment"/> <xsl:text>
 */

</xsl:text> </xsl:if> <xsl:text>create table </xsl:text><xsl:value-of select="@name"/><xsl:text> (
 </xsl:text> <xsl:apply-templates select="attributes"/> <xsl:text>
</xsl:text> <xsl:apply-templates select="operations"/> <xsl:text>
);
</xsl:text> </xsl:template> <xsl:template match="attribute"> <xsl:value-of select="$ident"/> <xsl:value-of select="name"/> <xsl:text> </xsl:text> <xsl:value-of select="type"/> <!-- <xsl:if test="not(position()=last())"> --> <xsl:text>, </xsl:text> <!-- </xsl:if> --> <xsl:text>
</xsl:text> </xsl:template> <xsl:template match="operation"> <xsl:value-of select="$ident"/> <!-- Constructor has no type --> <xsl:if test="type"> <xsl:value-of select="type"/> <xsl:text> </xsl:text> </xsl:if> <xsl:value-of select="name"/> <xsl:text>(</xsl:text> <xsl:for-each select="parameters/*"> <xsl:value-of select="type"/> <xsl:if test="@kind"> <xsl:text>&</xsl:text> </xsl:if> <xsl:text> </xsl:text> <xsl:value-of select="name"/> <xsl:if test="value"> <xsl:text> = </xsl:text> <xsl:value-of select="value"/> </xsl:if> <xsl:if test="not(position()=last())"> <xsl:text>, </xsl:text> </xsl:if> </xsl:for-each> <xsl:text>)</xsl:text> <xsl:if test="not(position()=last())"> <xsl:text>,
</xsl:text> </xsl:if> </xsl:template> <xsl:template match="text()"> </xsl:template> <xsl:template match="node()|@*"> <xsl:apply-templates match="node()|@*"/> </xsl:template> </xsl:stylesheet> <!-- Keep this comment at the end of the file Local variables: mode: xml sgml-omittag:nil sgml-shorttag:nil sgml-namecase-general:nil sgml-general-insert-case:lower sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:2 sgml-indent-data:t sgml-parent-document:nil sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: --> http://cvs.php.net/co.php/pear/DB_DataObject/docs/dia/stylesheets.xml?r=1.1&p=1 Index: pear/DB_DataObject/docs/dia/stylesheets.xml +++ pear/DB_DataObject/docs/dia/stylesheets.xml <?xml version="1.0"?> <config> <language name="UML" stylesheet="/usr/share/dia/plugins/xslt/dia-uml.xsl"> <implementation name="htmlform" stylesheet="/usr/share/dia/plugins/xslt/dia-html-edit.xsl"/> <implementation name="dbo" stylesheet="/usr/share/dia/plugins/xslt/dia-dbo.xsl"/> <implementation name="sql" stylesheet="/usr/share/dia/plugins/xslt/dia-sql.xsl"/> <implementation name="C++" stylesheet="/usr/share/dia/plugins/xslt/dia-uml2c++.xsl"/> <implementation name="Java" stylesheet="/usr/share/dia/plugins/xslt/dia-uml2java.xsl"/> <implementation name="IDL" stylesheet="/usr/share/dia/plugins/xslt/dia-uml2idl.xsl"/> </language> </config>