In the previous article in this series, we put together the main interface file. Before you can see how it will look, however, you need to describe it in a language that Mozilla can understand. This article will show you how to create the appropriate RDF file, register it with Mozilla's chrome directory, and in general get to the point where you can see the fruits of your labors over the previous two articles.
Now we have our main interface file, and I can imagine that you’re eager to see how it will look. But before you can get even a glimpse of it (due to the use of entity references instead of text) there are several things you need to do.
First, you need to describe the interface file in a language that Mozilla can understand; it needs to be described in the language of the Resource Description Framework (RDF.) Its very name gives us an idea of the mechanism for how it works; the XUL file is a resource, and the RDF file describes it.
The idea behind this framework for description is to enable information that would normally be separate to have identifiable relationships defined about it. RDF enables you to write machine (and human) readable data about data – metadata in fact.
The motivation behind this is of course, the semantic web. This is a term that you may have heard, and is a vision of the W3C of an intelligent web where information is autonomously shared. For a general example, image being able to search not for every web page that contains a target word or phrase, but for every page that contains a particular word in a particular context.
Getting back to the subject from which we’ve strayed, let’s create the RDF file that Mozilla needs in order to understand our interface. The implementation of RDF you are going to use is the RDF/XML strain. As such, your file will need to begin with the XML declaration:
The RDF:RDF container is used as the top level container, and namespace attributes are used to define the child elements in use: