public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] XML Schema files for metadata.xml, projects.xml and repositories.xml, for review and testing
@ 2016-03-06 11:01 Michał Górny
  2016-03-06 11:04 ` Michał Górny
  0 siblings, 1 reply; 16+ messages in thread
From: Michał Górny @ 2016-03-06 11:01 UTC (permalink / raw
  To: gentoo-dev; +Cc: qa, Gentoo Council

[-- Attachment #1: Type: text/plain, Size: 1862 bytes --]

Hello, everyone.

As you may be aware, we were considering replacing the DTD files for
our XML documents with a more modern and more complete format. As part
of considering options for this, I've written XML Schema files [1] that
provide a more correct replacement for the current DTD files and I'd
like you to review it.

XML Schema not only allows us to express our data formats more
correctly than DTD but also gives some degree of value checks.
In particular, it finds a number of existing issues that DTD can't
find.

For example:

  $ xmllint --noout --schema projects.xsd projects.xml
  projects.xml:864: element project: Schemas validity error : Element
  'project': Duplicate key-sequence ['desktop-misc@gentoo.org'] in key
  identity-constraint 'projectKey'. projects.xml fails to validate

which means there are two projects using the same e-mail address
(and therefore being ambiguous for metadata references).

Aside to the usual structure errors, my schemas find:

- duplicate keys (project e-mails, repository names),

- duplicate supposedly-unique values (like duplicate
  <longdescription/>s in the same language),

- some data well-formedness errors (e.g. <pkg/> tags referencing
  things that are not correct qualified package names),

- some random weirdnesses (like using multiple <use/> blocks for
  flags, for no good reason).

I should note that I've based those schemas on existing DTDs, PMS
and some understanding guesswork, so they may be over- or understrict.
If someone can provide better PMS-y package name regexps, I'd
appreciate.

Please test and review. I'm going to reply to this mail with the list
of current metadata.xml validation failures (it's quite long).

[1]:https://github.com/mgorny/gentoo-xml-schema

-- 
Best regards,
Michał Górny
<http://dev.gentoo.org/~mgorny/>

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 949 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread
* [gentoo-dev] XML Schema files for metadata.xml, projects.xml and repositories.xml, for review and testing
@ 2016-03-06  9:43 Michał Górny
  0 siblings, 0 replies; 16+ messages in thread
From: Michał Górny @ 2016-03-06  9:43 UTC (permalink / raw
  To: gentoo-dev; +Cc: qa, Gentoo Council

[-- Attachment #1: Type: text/plain, Size: 1859 bytes --]

Hello, everyone.

As you may be aware, we were considering replacing the DTD files for
our XML documents with a more modern and more complete format. As part
of considering options for this, I've written XML Schema files [1] that
provide a more correct replacement for the current DTD files and I'd
like you to review it.

XML Schema not only allows us to express our data formats more
correctly than DTD but also gives some degree of value checks.
In particular, it finds a number of existing issues that DTD can't
find.

For example:

  $ xmllint --noout --schema projects.xsd projects.xml
  projects.xml:864: element project: Schemas validity error : Element 'project': Duplicate key-sequence ['desktop-misc@gentoo.org'] in key identity-constraint 'projectKey'.
  projects.xml fails to validate

which means there are two projects using the same e-mail address
(and therefore being ambiguous for metadata references).

Aside to the usual structure errors, my schemas find:

- duplicate keys (project e-mails, repository names),

- duplicate supposedly-unique values (like duplicate
  <longdescription/>s in the same language),

- some data well-formedness errors (e.g. <pkg/> tags referencing
  things that are not correct qualified package names),

- some random weirdnesses (like using multiple <use/> blocks for
  flags, for no good reason).

I should note that I've based those schemas on existing DTDs, PMS
and some understanding guesswork, so they may be over- or understrict.
If someone can provide better PMS-y package name regexps, I'd
appreciate.

Please test and review. I'm going to reply to this mail with the list
of current metadata.xml validation failures (it's quite long).

[1]:https://github.com/mgorny/gentoo-xml-schema

-- 
Best regards,
Michał Górny
<http://dev.gentoo.org/~mgorny/>

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 949 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2016-03-06 21:34 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-06 11:01 [gentoo-dev] XML Schema files for metadata.xml, projects.xml and repositories.xml, for review and testing Michał Górny
2016-03-06 11:04 ` Michał Górny
2016-03-06 11:27   ` Sergei Trofimovich
2016-03-06 12:24   ` Davide Pesavento
2016-03-06 18:12     ` Justin <jlec>
2016-03-06 18:18       ` Michał Górny
2016-03-06 18:26         ` Davide Pesavento
2016-03-06 18:31           ` Michał Górny
2016-03-06 19:28             ` Ulrich Mueller
2016-03-06 19:35               ` Michał Górny
2016-03-06 20:22               ` Justin <jlec>
2016-03-06 20:49                 ` Michał Górny
2016-03-06 21:34                   ` Justin <jlec>
2016-03-06 18:31         ` Justin <jlec>
2016-03-06 18:25       ` Kent Fredric
  -- strict thread matches above, loose matches on Subject: below --
2016-03-06  9:43 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox