RDF

RDF is a language for describing resources. Although you can use it to describe any kind of resource, it's usually used to describe Web documents and sites. RDF is a W3C recommendation, and its main page is at www.w3.org/RDF. You can find the RDF model and syntax specification at www.w3.org/TR/REC-rdf-syntax, and you can find the RDF schema specification at www.w3.org/TR/rdf-schema. Here's what the W3C says about RDF:

The Resource Description Framework (RDF) is a foundation for XML documents to be read as metadata; it provides interoperability between applications that exchange machine-understandable information on the Web. RDF uses XML to exchange descriptions of Web resources, but the resources being described can be of any type, including XML and non-XML resources.

What does RDF look like? Here's an example:

 <?xml version="1.0" ?>  <rdf:RDF     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">     <rdf:Description about="http://www.starpowder.com/planets.html">         <Creator>Nicolas Copernicus</Creator>     </rdf:Description> </rdf:RDF> 

This RDF document describes the document at www.starpowder.com/planets.html and lists that document's creator, Nicolas Copernicus. RDF is general enough to support all kinds of resource descriptions, but complete generality may not be what you need. To be useful, descriptions should use agreed-upon terms. Several sublanguages or grammars use RDF and define specific XML elements for describing resources; I'll take a look at the most popular such sublanguage in this chapter, the Dublin Core. For example, RDF itself does not define an element named <Creator> to indicate the resource's creator; however, <Creator> is an element in the Dublin Core, which means that Web search engines that support the Dublin Core will know enough to search for <Creator> elements when they want to find a particular Web resource's author.

Support for RDF is growing. Here's a partial list of what's available in RDF today:

  • http://www710.univ-lyon1.fr/~champin/rdf-tutorial is an RDF tutorial online. (It's in English, even though the Web page is in France.)

  • http://www.w3.org/1999/02/26-modules is the PerlXmlParser, which is a set of Comprehensive Perl Archive Network (CPAN) modules by Eric Prud'Hommeaux (a W3C member). It supports an RDF SAX parser and a simple database interface for Perl.

  • http://www.ics.forth.gr/proj/isst/RDF is a validating RDF parser by ICS-FORTH. It's a Java parser with some support for RDF schemas.

  • http://nestroy.wi-inf.uni-essen.de/xwmf is the XWMF (eXtensible Web Modeling Framework). It offers a number of tools, including an RDF parser.

  • http://www.w3.org/Library/src/HTRDF is John Punin's RDF parser in C.

  • http://www.mozilla.org/rdf/doc explains about Mozilla's RDF implementation. I'll say more about this later.

  • http://www.w3.org/RDF/Validator/ is a Simple RDF validator.

  • http://lists.w3.org/Archives/Public/www-rdf-interest/2000May/0009.html is an RDF parser in XSLT by Dan Connolly.

Although no major browser has yet supported RDF in a big way, Mozilla, Netscape Navigator's open source version, has a lot of RDF support built into it. Here are some of the documents covering RDF in Mozilla:

  • http://www.mozilla.org/rdf/50-words.html One of Mozilla's "In Fifty Words or Less" articles. This is an overview of RDF and how it fits with Mozilla. It also includes examples.

  • http://www.mozilla.org/rdf/back-end-architecture.html A very detailed document that describes how the RDF "back end" works in Mozilla. Although it doesn't have sample code now, it will some day: It will show how to use the back end directly as a client and how to write your own RDF data source.

  • http://www.mozilla.org/rdf/doc/faq.html The RDF-in-Mozilla FAQ. You'll also find some sample code.

  • http://www.mozilla.org/rdf/doc/datasource-howto.html A cookbook approach to creating an RDF datasource.

  • http://www.mozilla.org/rdf/rdf-nglayout.html How RDF is handled in Mozilla to create a content model consistent with W3C Level 1 DOM.

  • http://www.mozilla.org/rdf/doc/api.html The RDF Technical Overview. It provides an overview of the Mozilla RDF implementation.

  • http://www.mozilla.org/rdf/doc/vocabs.html The Mozilla RDF metadata vocabularies.

You can also get more information about software support for RDF in Mozilla at these locations:

  • http://www.mozilla.org/rdf/doc/SmartBrowsing.htmlMozilla's SmartBrowsing system. It allows third-party metadata servers to provide XML/RDF " related link" annotations.

  • http://www.mozilla.org/rdf/doc/aurora.html Mozilla's Aurora project, which is the code name for the user interface in Mozilla that handle RDF data sources.

  • http://www.mozilla.org/rdf/doc/flash-spec.html The Mozilla Flash Specification. The Flash system offers an XML/RDF system for offering up-to-the-minute information about events that are of interest to the user.

  • http://www.mozilla.org/rdf/doc/z3950.html The Mozilla RDF/Z39.50 Integration Project, which lets you connect to digital library systems. This project is all about using the ANSI/NISO Z39.50 search protocol from inside Mozilla.

What about RDF support in Internet Explorer? There really isn't anyat least, not yet. However, Microsoft does offer an RDF viewer, which is currently at http://msdn.microsoft.com/downloads/samples/Internet/xml/xml_rdf_viewer/sample.asp. Here's Microsoft's description of the RDF viewer:

The sample is written in Visual Basic 6.0 and consists of a single form. Users can enter the URL of a known RDF file, or they can choose buttons that represent RDF files from three different sources. The form then retrieves the RDF file, which is then parsed using the MSXML parser. The contents of the RDF file are presented in a list box, and any URL links attached to each item are stored in an array. When an item in the list box is selected, the page represented by the associated URL is displayed in the Browser control.

To run the viewer, however, you need Internet Explorer 5.0, Visual Basic 6.0, and Windows 98, Windows NT 4.0, or Windows 2000.

As you can see, there's a lot of material out there on RDF. It's time to get to the RDF details now, starting with RDF syntax.



Real World XML
Real World XML (2nd Edition)
ISBN: 0735712867
EAN: 2147483647
Year: 2005
Pages: 440
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net