Le jeudi 23 novembre 2006 à 13:15 -0500, Daniel Veillard a écrit : > A few years ago I created a Relax-NG schemas for comps.xml, it's certainly > way out of date but may be used as a starting point, Thanks Daniel, unfortunately I had already started my own schema, so don't get offended if mine is not derived from yours (I did look at it — unfortunately it seems you blocked on the same parts as me) Here is a very raw Relax-NG comps schema. Bear in mind I wrote it after skimming 5 min for the first time the Relax NG tutorial, so my style may not be perfect 1. it validates FC-devel and FC-6 x86_64 comps files 2. it does not validate FE-devel and FE-6 x86_64 comps because I've forbidden empty groups. I could allow them but IMHO stricter is better 3. I couldn't find any FC-5 area comps files 4. I fails on FC-4 comps files, as the syntax used at that time was different More testing of other comps files (other arches, repos, comps with mistakes) and with other xml parsers (I used rawhide xmllint) would be appreciated. To test a comps file just change the root element to : <comps xmlns="urn:fedora:comps:0.1"> (no avoiding it as we've only specified a bogus DTD and no namespace so far) Some questions (ok, a _lot_ of questions) 1. What namespace should comps use? a. a namespace associated to Red Hat, the Fedora project, some other entity (yum, rpm, whatever)? b. should we go URN (compact but requires reclaration of the URN root) or URL for the namespace (if we go URL It'd be real nice to have a persistent URL with the schema and eventually some doc there)? c. do we want to version the schema (the FC4 example shows the comps syntax changed in the past) or will we commit to a stable grammar from now on? 2. do we want to keep the metapackage element? It's used *once* in 6 & devel, and I haven't the faintest idea what its form can be (Daniel's schema shows it was already a big mystery in the past) 3. all the constraints I declared need to be reviewed by an anaconda/yum/createrepo expert. They match what I've seen in actual comps files but the rules the tools want may be slightly different 4. likewise, there are probably other constraints (typing...) I missed 5. is it absolutely necessary to mangle element names in comps.xml.in? That would require a *separate* schema for comps.xml.in and probably namespace change when comps.xml.in is transformed in comps.xml 6. What package should own the schema and install/register it on the system? Regards, -- Nicolas Mailhot -- fedora-extras-list mailing list fedora-extras-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/fedora-extras-list