Bug #1847 [Opn->Csd]: package-1.0 dtd

From: Date: Mon, 12 Jul 2004 10:37:45 +0000
Subject: Bug #1847 [Opn->Csd]: package-1.0 dtd
References: 1  Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-4586@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=1847&edit=1 ID: 1847 Updated by: mike@php.net Reported By: ludoo at php dot net -Status: Open +Status: Closed Type: Bug Package: Documentation PHP Version: Irrelevant New Comment: Err, we might rather want to use this one: http://pear.php.net/dtd/package-1.1 :) It seems to fix all issues you mentioned. Thanks for the report. Previous Comments: ------------------------------------------------------------------------ [2004-07-12 06:21:47] ludoo at php dot net Quote mike: > Exactly, despite "release" should not occur more than once, should it? Right, my fault. IMHO the "release" element should be changed too, to have all mandatory subelements, and one optional "notes" subelement. The same goes for the "maintainer" element. ------------------------------------------------------------------------ [2004-07-12 05:38:06] mike at php dot net Quote ludoo: a better fix would be something like this: <!ELEMENT package (name,summary,description,license,maintainers,release+,changelog*)> -- Exactly, despite "release" should not occur more than once, should it? ------------------------------------------------------------------------ [2004-07-12 05:27:54] ludoo at php dot net a simple check: - get the DB package.xml file - add a DTD declaration to it pointing to the package-1.0 dtd - run xmllint --noout --valid package.xml - observe lots of errors scroll by, the last one being: package.xml:166: element package: validity error : Element package content does not follow the DTD, expecting (name | summary | description | license | maintainers | release | changelog), got (name summary description license maintainers release ) simple fix: allow more than one child in the package element: <!ELEMENT package (name|summary|description|license|maintainers|release|changelog)+> xmllint --noout --valid package.xml now gives lots of errors for missing attribute declarations, but the package element error is gone a better fix would be something like this: <!ELEMENT package (name,summary,description,license,maintainers,release+,changelog*)> What's the use of a dtd if: a) it does not work b) nobody verifies their package.xml with it ------------------------------------------------------------------------ [2004-07-12 05:17:41] mike at php dot net Why should multiple elements of these be allowed? ------------------------------------------------------------------------ [2004-07-11 18:51:25] ludoo at php dot net Description: ------------ I guess there's a bug in the package-1.0 DTD, the declaration for the package element is missing a +: <!ELEMENT package (name|summary|description|license|maintainers|release|changelog)> should be <!ELEMENT package (name|summary|description|license|maintainers|release|changelog)+> not sure if this goes in the Documentation category..... ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=1847&edit=1

« previous php.pear.doc (#4586) next »