Re: An experiment with xsl
| From: | Alan Knowles | Date: | Thu, 09 Sep 2004 08:52:47 +0000 |
| Subject: | Re: An experiment with xsl | ||
| References: | 1 | Groups: | php.pear.general php.pear.general |
| Request: | Send a blank email to pear-general+get-14472@lists.php.net to get a copy of this message | ||
Thanks, I've added these to CVS
http://cvs.php.net/pear/DB_DataObject/docs/dia/
It's a nice way to quickly prototype an app, unfortunatly I always find it's difficult to maintain database structures this way over a long period of time.. (eg. If you need to add a column, after you've made the database, it's a bit difficult to either make the model know that something has changed, or to reverse enginer the database back into the model.)
Regards
Alan
Interesting use of dia,
J llarens wrote:
Since almost 1 year Im reading about the use of xml in design and coding phases. But my only source of info is internet because here the good books regarding IT are very expensive. 3W could give me a lot of info, but, in conjunction, fragmented and sometimes contradictory. Few months ago I discover the xslt plugins inside Dia, and voila! the plugins/xslt directory have a working and traceable set of examples of xml and xslt for code generation. Messing and mixing with the examples I can produce this xsl's (attached in this mail): dia-uml to PEAR DB_DataObject .ini files and .php table object (not including relationships) dia-uml to HTML form for record editing dia-uml to MySQL database definition To get the results whitout using dia I use this at commandline: xsltproc /usr/share/dia/plugins/xslt/dia-uml.xsl osdata.dia > osdata.xml to get the pear clases and .ini file: xsltproc /usr/share/dia/plugins/xslt/dia-dbo.xsl osdata.xml to get the html form: xsltproc /usr/share/dia/plugins/xslt/dia-html-edit.xsl osdata.xml to get the MySQL data definition: xsltproc /usr/share/dia/plugins/xslt/dia-sql.xsl osdata.xml ROCKS! But still there are some things that Im unable to achieve: I cant see how to include relationships (foreign key -> primary key), I dont see the data about the relationships in the created osdata.xml, the dia-uml.xsl simply dont take it in account. I dont know how to implement some 'extra stuff' like labels to use instead of fieldnames in HTML forms. I think that operations tab in properties of a class is the right place to put things like labels and sizes etc but Im not sure and I suppose there is a standard procedure to follow, but I did not found it. My ultimate (and long-term, sigh) goal is to build a PHP application (well... most part of the application at less) simply translating an UML model. Someone have that missing info or can guide to a related resource? ___________________________________________________________ 100mb gratis, Antivirus y Antispam Correo Yahoo!, el mejor correo web del mundo http://correo.yahoo.com.ar