RDF for XML Developers
From GetSemantic
Because of RDF's basis in XML, some XML developers are initially attracted to RDF. There are some important things to remember.
Contents |
[edit] With RDF Model, not Syntax, is the issue
RDF is not an XML format, it is a model with multiple representations - not all of which are XML-based. In fact, if you are writing RDF by hand, the XML format is probably the least useful format. Instead, you should use Notation 3 or Turtle instead. You can use Cwm to convert back to RDF/XML.
[edit] Additive model
In XML, you can make inferences based on the absence of an element or attribute, this is not an approach that can be take with RDF data. You should explicitly state that something is not so rather than inferring it's falsity based on it's non-existence.
See Absence Is Not A Bug.
[edit] Don't use XML tools, use an RDF library
You should not rely on XML tools like XSLT, XPath and XQuery to read XML data. You can represent the same data in many different ways even within RDF/XML. There are a wide variety of libraries and tools to read RDF in different programming languages and contexts. Use those instead of XML tools.
See The Sixteen Faces of Eve by Ian Davis for more details.
[edit] RDFS/OWL, not XSD/RNG etc.
RDF has it's own native set of schema formats - RDF Schema and OWL. Just as you shouldn't use XML tools to parse RDF, you shouldn't use XML schema languages to specify RDF. RDF Schema and OWL work across different formats.
[edit] Unicode, now!
If you don't use Unicode, you should start doing so. Unicode rocks. Notation 3 uses UTF-8.
[edit] GRDDL saves time
If you are publishing data as XML, you can use GRDDL to describe a simple transformation (in XSLT) to turn that XML (or HTML) into RDF.

