Re: 1998/04/15 GNOME snapshot comments




Miguel de Icaza <miguel@nuclecu.unam.mx> writes:

> > 	  - I think RDF (http://www.mozilla.org/) should be seriously looked
> > 	    into.
> 
> What is RDF?

Naughty, naughty.  You should know that.

  http://www.w3.org/Metadata/

This is basically the format the whole computer industry has gotten
behind to represent "Descriptions about Objects" (my words).  Think of
it as a standard way of serializing objects.  I think it originated
from Apple's MCF (Meta Content Framework).

It's really simple - it's based on XML.

ie.  Here's a snippet of RDF Dan Veillard put together to describe an
RPM (rpm2html will generate these soon):


<?XML version="1.0">
<?namespace href ="http://www.w3.org/TR/WD-rdf-syntax#/" AS = "RDF"?>
<?namespace href ="http://www.rpm.org/" AS = "RPM"?>
<RDF:RDF>
 <RDF:Description RDF:HREF="ftp://ftp.redhat.com/pub/contrib/i386/rpm2html-0.90-1.i386.rpm">
  <RPM:Name>rpm2html</RPM:Name>
    <RPM:Version>0.90</RPM:Version>
    <RPM:Release>1</RPM:Release>
    <RPM:Distribution>Unknown</RPM:Distribution>
    <RPM:Vendor>Daniel Veillard</RPM:Vendor>
    <RPM:Size>Daniel Veillard</RPM:Size>
    <RPM:URL>http://rufus.w3.org/linux/rpm2html/</RPM:URL>
    <RPM:BuildDate>Sun Mar 29 19:44:53 EST 1998</RPM:BuildDate>
    <RPM:BuildHost>rufus.w3.org</RPM:BuildHost>
    <RPM:Vendor>X11/Applications</RPM:Vendor>
    <RPM:Packager>Daniel Veillard</RPM:Packager>
    <RPM:Summary>Translates rpm database into html info</RPM:Summary>
    <RPM:Sources>Translates rpm database into html info</RPM:Sources>
    <RPM:Description>
Rpm2html tries to solve 2 big problems one face when
grabbing a RPM package from a mirror on the net and trying to
install it:

   - it gives more information than just the filename before
     installing the package.
   - it tries to solve the dependancy problem by analyzing all
     the Provides and Requires of the set of RPMs. It shows the
     cross references by the way of hypertext links.

    </RPM:Description>
    <RPM:Provides>
        <RDF:Bag>
	    <RPM:Resource>rpm2html</RPM:Resource>
        </RDF:Bag>
    </RPM:Provides>
    <RPM:Requires>
        <RDF:Bag>
	    <RPM:Resource>libz.so.1</RPM:Resource>
	    <RPM:Resource>libdb.so.2</RPM:Resource>
	    <RPM:Resource>libc.so.6</RPM:Resource>
	    <RPM:Resource>ld-linux.so.2</RPM:Resource>
        </RDF:Bag>
    </RPM:Requires>
    <RPM:Files>
/etc/rpm2html.config
/usr/bin
/usr/bin/rpm2html
/usr/doc/rpm2html-0.85
/usr/doc/rpm2html-0.85/CHANGES
/usr/doc/rpm2html-0.85/COPYING
/usr/doc/rpm2html-0.85/PRINCIPLES
/usr/doc/rpm2html-0.85/README
/usr/doc/rpm2html-0.85/TODO
/usr/doc/rpm2html-0.85/config.small
/usr/man/man1/rpm2html.1
/usr/share/rpm2html/msg.de
/usr/share/rpm2html/msg.es
/usr/share/rpm2html/msg.fr
    </RPM:Files>
  </RDF:Description>
</RDF:RDF>


Not to be outdone - I made a Debian Packages file to RDF converter:

<?XML version="1.0">
<?namespace href="http://www.w3.org/TR/WD-rdf-syntax#/" as="RDF"?>
<?namespace href="http://www.jimpick.com/deb2rdf1.0/" as="DEB"?>
  <RDF:Description RDF:HREF="ftp://ftp.debian.org/pub/debian/dists/frozen/main/binary-i386/text/2utf_1.
03.deb"
    <DEB:Package>2utf</DEB:Package>
    <DEB:Version>1.03</DEB:Version>
    <DEB:Priority>optional</DEB:Priority>
    <DEB:Section>text</DEB:Section>
    <DEB:Maintainer>Ricardas Cepas &lt;rch@debian.org&gt;</DEB:Maintainer>
    <DEB:Depends>libc6</DEB:Depends>
    <DEB:Recommends>locales | wg15-locale, man-db (&gt;= 2.3.10-37)</DEB:Recommends>
    <DEB:Suggests>tcs, kbd (&gt;= 0.95)</DEB:Suggests>
    <DEB:Architecture>i386</DEB:Architecture>
    <DEB:Filename>dists/frozen/main/binary-i386/text/2utf_1.03.deb</DEB:Filename>
    <DEB:Size>49486</DEB:Size>
    <DEB:MD5sum>3845c9331b5a6a72face876dddfd7249</DEB:MD5sum>
    <DEB:Description>Translates char-sets and decodes MIME.</DEB:Description>
    <DEB:LongDescription>
Filter for char-set translation to and from Unicode.
Gets char-set definitions from WG15 locales char-maps or similiar tables.
Can decode nested multi-part MIME messages and invoke external filters.
Can display char-maps and current console font.
    </DEB:LongDescription>
  </RDF:Description>


(the script to do this is pretty simple)

If you look at it - it's pretty simple.  The tags that start with
<RDF:...> are defined by the RDF spec.  All the rest are defined by
the user (using their own namespace).

You define each object with an URL inside a <RDF:Description ...> tag.
All the descriptive information about that appears between the
<RDF:Description ...> and </RDF.Description> tags.

This format is pretty simple, easy to parse in a consistant memory
structure (lots of tools available), and will be supported be
everybody.  It's probably good enough to handle 90% of the metadata
stored and processed by computers.  You can even represent filesystem
type data this way (several people have done it) - not very compactly,
of course.

The new Netscape "Aurora" super-bookmark-arranger-filesystem-browser
thing (which looks like it may be positioned directly opposite
Midnight Commander) is entirely based on RDF.  That's why I'm
surprised you weren't aware of it.  :-)

Cheers,

 - Jim




PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]