[Rpm-metadata] take 3 (or is it 4) whatever :)

Daniel Veillard veillard at redhat.com
Thu Oct 9 08:56:17 UTC 2003


On Thu, Oct 09, 2003 at 12:52:58AM -0400, seth vidal wrote:
> now the tool that comes along behind will need to know if they are rpms
> or debs or what. So we can't homogenize the format so much that there is
> little way to tell which is which.
> 
> So maybe a simple thing to start with:
> 
> <package xmlns="http://www.yoursite.org/ns/rpm">
> <name>foo</name>
> <arch>i386</arch>
> <arbitraryns:some-metadata />
> ....
> </package>

  No ! Do not mess with the namespace, and make it dependant to 
who have run the package. Your suggestion is NOT a appropriate 
namespace use.
  If you need to differenciate between RPM and debian, put an
attribute flag. By changing the global namespace you break all the
tools which are implemented correctly.
   {http://www.yoursite.org/ns/rpm}package
should NOT be processed the same way as
   {http://www.mysite.org/ns/rpm}package
 
 You must consider the semantic of the tags to be associated to the
fully qualified information (namespace name + local tag name)
i.e. the URI used for the namespace + the tag name
 Waht you suggest implied that the tools would have to drop check
for the namespace name and hence work on a non-compliant to the
XML Namespace spec . Do NOT do that.
 The namespace must be unique for the semantic of the tags we define
For the tags where there is no agreement on semantic, then they are not
part of the spec and should be implemented in different namespace.
 Do not mess with namespace if you don't understand the model, read
the spec if needed it's short !
   http://www.w3.org/TR/REC-xml-names/

> So I'm taking part of what Darrin recommended but giving the parser a
> quick way to skip the package if they don't understand it/don't need it.

  the package tag must be understood by all tools, it must be in a 
unique weel defined namespace associated to the the spec defining
the semantic of the tags.

> so, for example, if jbj gets his way and rpm becomes capable of dealing
> with debs, then I can make yum start grokking the :
> <package xmlns="http://thatsite/ns/deb">

  if you use a different namespace, taht means the software we are building
don't understand it, no need to define what we don't understand, we are here
to define what we should understand.
  If there are tags in a package using a namespace not understood by the tool
just ignore it. That's the only thing we need to define w.r.t. other
namespaces. Still it's FAR FAR better to have 80 tags understood in a 
package description and 5 in a foreign namespace not understood than 
trying to dig some information in a full set of tags under a different
namespace taht we don't understand. Your approach messes with the 
clean principle of 1 namespace = 1 semantic which makes the format
extensible without breaking apps, do not do that !

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard at redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



More information about the Rpm-metadata mailing list