[Rpm-metadata] xml - first try

Daniel Veillard veillard at redhat.com
Mon Sep 1 11:10:33 UTC 2003


On Sun, Aug 31, 2003 at 11:13:09PM -0400, Joe Shaw wrote:
> On Sun, 2003-08-31 at 22:55, seth vidal wrote:
> > First try at the xml format
> > 
> > Don't abuse me too much but tell me what it is missing and where I went
> > horribly wrong :)
> 
> A couple things
> 
> What is the purpose of the "rpm" tag?  Is it for rpm-specific data?  If
> so, then maybe the packager, vendor, buildhost, and header-ranges should
> go there, as I don't think dpkgs have those elements.  Maybe group too,
> since they're pretty different and arbitrary for the packaging systems.

  yeah rpm tag should be renamed. I actually would find cleaner a full
package URL as a mandatory URL="..." attribute on the <package> tag.
Splitting the URL can be done elsewhere, extends the format for no good
reason, and makes even more likely stupid mistakes.
  I would also add a <source> tag in it if there is a source URL available
for the given package.

> Also, how are we going to handle the encoding of things like the summary
> and description?  The text in the RPM always seems to be in the
> appropriate encoding for whatever language you're viewing it in, but
> there's no way to know exactly what that is to convert it to UTF-8 for
> serializing into XML.

  That's a problem of the RPM, not of this format. W.r.t. encoding, and for
compatibility purpose it is strongly suggested to limit the encoding of the
XML instances to UTF-8 or UTF-16 since that's the two only encoding that any
XML parser must support. And of course UTF-8 usually makes far more sense
considering the average content of the metadata. I also suggest to always
have the encoding specified even if the spec doesn't make them mandatory
for UTF-8 and UTF-16, 
   <?xml version="1.0" encoding="UTF-8"?>

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