Home > Articles > Programming > Java

  • Print
  • + Share This
Like this article? We recommend


Now let's step out of theoretical la-la land and back into the here and now. You have resources and you want to use RDF to classify them. The good news is that you don't have to be an academic with a doctorate in formal logic theory to put this stuff to use.

We've already seen that RDF specifies that the relationships between nodes of information can be represented using URI references. What does this actually look like in XML?

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  <rdf:Description rdf:about="">
     <dc:title>What's the Deal with RDF?</dc:title>
     <dc:creator>Daniel Appelquist</dc:creator>

The above bit of RDF takes the previous graph one step further, by describing the article you're reading in RDF's XML syntax using a specified RDF entity set called the Dublin Core. RDF uses XML Namespaces syntax to tell us that the title and creator elements are from an XML namespace that "lives" at the end of the URI http://purl.org/dc/elements/1.1/. The attribute rdf:about="" (with a blank value for the URI) in the description tag indicates that the RDF description refers to the enclosing resource—in this case, the article you're reading.

  • + Share This
  • 🔖 Save To Your Account