Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.8.6

Doc Bug #12261 xsl transformation chooses wrong value for length
Submitted: 2007-10-16 19:33 UTC
From: ggramlich Assigned: ifeghali
Status: Closed Package: MDB2_Schema (version 0.8.1)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


 [2007-10-16 19:33 UTC] ggramlich (Gregor Gramlich)
Description: ------------ The xsl transformation shows the value of the first <length> elment for each <field> with a <length> in a <table>. In MDB2_Schema/docs/schema2html.xsl change line 147 from <xsl:template name="showlength">(<xsl:value-of select="//length"/>) to <xsl:template name="showlength">(<xsl:value-of select="current()"/>) (or to <xsl:template name="showlength">(<xsl:value-of select="../length"/>) )

Comments

 [2007-10-16 20:29 UTC] ifeghali (Igor Feghali)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.
 [2007-10-17 07:05 UTC] ggramlich (Gregor Gramlich)
Thanks for the quick fix. I re-opened the bug, instead of creating a new one: The same problem applies to MDB2_Schema/docs/MDB.xsl line 90. Change "//length" to "current()". One more point about documentation: neither the MDB.dtd nor the MDB.xsd allow <comments> for <index>, but the description.schema.xml uses <comments> and schema2html.xsl renders it. I think, the dtd and xsd should be changed accordingly. Maybe even a <description> should be allowed for <index>.
 [2007-10-17 09:36 UTC] ifeghali (Igor Feghali)
Currently our XML schema doesn't allow neither a comment or a description for indices. more here: http://cvs.php.net/viewvc.cgi/pear/MDB2_Schema/docs/xml_schema_documentation.html?view=markup description.schema.xml is not touched for a long time. please let me know if you want to suggest another change before I commit the fix. regards, iGor.
 [2007-10-17 10:04 UTC] ggramlich (Gregor Gramlich)
I am not sure, if what is written here: http://pear.php.net/manual/en/package.database.db-table.intro-database.php Quote: The XML schema used by these methods is an extension of the current MDB2_Schema DTD, extended so as to allow specification of foreign key references. This extension for foreign keys has been agreed upon for adoption in a future release of MDB2_Schema. End quote. is already adopted, since there is a <foreign> section in http://cvs.php.net/viewvc.cgi/pear/MDB2_Schema/docs/xml_schema_documentation.html?view=co So maybe the docs should be updated for DB_Table_Database. Suggestions: <comments> and maybe <description> elements for <index> as well as for <foreign>. Right now I don't see other desirable changes.
 [2007-10-17 21:16 UTC] ifeghali (Igor Feghali)
Yes <foreign> is already adopted sice 0.8.0. xml_schema_documentation.html is the most reliable source for MDB2_Schema features. Pretty much everything shown in there should be already implemented. So you may want to report a new documentation problem for the DB package. Regarding your suggestions about the new XML elements please open a new feature request. regards, iGor.
 [2007-10-17 21:20 UTC] ifeghali (Igor Feghali)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.