Re: Pyrus: xsd is broken
| From: | Christian Weiske | Date: | Thu, 11 Mar 2010 07:33:05 +0000 |
| Subject: | Re: Pyrus: xsd is broken | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-53318@lists.php.net to get a copy of this message | ||
Hi Brett,
The package-2.0.xsd is broken: No directories without files are allowed.
See following xml:
> <contents>
> <dir name="/">
> <dir name="data">
> <dir name="setup">
> <file role="datapdl" name="config.php.dist" />
> <file role="datapdl" name="setup-vhost.sh" />
> </dir>
> </dir>
> </dir>
> </contents>
This fails to validate because the XSD says:
> <xs:element name="dir">
> <xs:complexType>
> <xs:choice>
> <xs:sequence maxOccurs="unbounded">
> <xs:element ref="dir" maxOccurs="unbounded"/>
> <xs:element ref="file" maxOccurs="unbounded"/>
> </xs:sequence>
> <xs:sequence maxOccurs="unbounded">
> <xs:element ref="file" maxOccurs="unbounded"/>
> <xs:element ref="dir" minOccurs="0"
> maxOccurs="unbounded"/>
> </xs:sequence>
> </xs:choice>
> <xs:attribute name="baseinstalldir" type="xs:string"/>
> <xs:attribute name="name" type="xs:string"
> use="required"/>
> </xs:complexType>
> </xs:element>
Short: Currently it is not allowed to have <dir> elements without a
single <file> in them.
The errors I get:
----------------
cweiske:~/Dev/cvs/pear/xsd> xmllint --noout --schema package-2.0.xsd
stagCMS-package.xml stagCMS-package.xml:36: element dir: Schemas
validity error : Element '{http://pear.php.net/dtd/package-2.0}dir':
Missing child element(s). Expected is one of
( {http://pear.php.net/dtd/package-2.0}dir,
{http://pear.php.net/dtd/package-2.0}file ).
stagCMS-package.xml:35:
element dir: Schemas validity error : Element
'{http://pear.php.net/dtd/package-2.0}dir':
Missing child element(s).
Expected is one of ( {http://pear.php.net/dtd/package-2.0}dir,
{http://pear.php.net/dtd/package-2.0}file ).
stagCMS-package.xml fails
to validate
----------------
--
Regards/Mit freundlichen Grüßen
Christian Weiske
-=≡ Geeking around in the name of science since 1982 ≡=-
Attachment: [application/pgp-signature] signature.asc
Attachment: [application/pgp-signature] signature.asc