W3C home > Mailing lists > Public > www-rdf-interest@w3.org > November 2004

Re: I guess it's a stupid questions...

From: Stefano Mazzocchi <stefano@apache.org>
Date: Fri, 12 Nov 2004 15:12:10 -0500
Message-ID: <4195191A.5000306@apache.org>
To: Michael Henson <mike@axl.net>
CC: www-rdf-interest@w3.org

Michael Henson wrote:
> On Sat, 2004-11-13 at 02:42 +0800, Petko Petkov wrote:
> 
>>I guess it’s a stupid question, but I still do not understand why RDF is better than just XML.
>>I understand that XML is just an approach of describe other markup languages and I believe that
>>RDFS goes on the top of XML. That’s great, but, we are making our lives harder again and again.
>>Simple XML tags are much powerful than RDF statements and the triplets can be represented in much
>>simpler way using namespaces. 
>>
>>I have read somewhere that XML and XML Schemas are not good because XSD implies specific rules on
>>the document structure. I find this explanation rather stupid than complete. XSD have the capabilities
>>to include into a particular element different elements that may come from different namespace for example. 
>>I examined Firefox structure to see real RDF examples. Although, Firefox is just the best browser in the
>>world, RDFS can be replaced by XML.
>>
>>Can somebody explain to me?
>>
>>Thanks
>>
> 
> 
> The following article is a decent RDF is not XML intro:
> http://www.betaversion.org/~stefano/linotype/news/57/

and in really short terms:

  the XML model has implicit relationships between items, the RDF model 
makes them explicit.

So, they are equivalent in term of semantic interoperability of 
concepts, but they are not in terms of relationships (you need a more 
constrained XML model, which is what RDF/XML gives you).

If you don't care about semantic interoperability of relationships, keep 
using XML and be happy. There is nothing wrong in that, but the rest of 
the world won't be able to understand your data, even if properly 
namespaced because the "meaning" of the nesting of the tags will have to 
be 'guessed' by the XML reader.

But if you care about other people using your data without having to 
guess their internal relationships, use RDF, or make those relationships 
explicit by XSLT transforming your XML into RDF (here, the XSLT will 
contain the information that is missing in the XML model).

For more info, you might also want to read Part II of my guide:

http://www.betaversion.org/~stefano/linotype/news/78/

Oh, and it's not a stupid question at all. Actually is a really really 
good one and the fact that XML people don't get why RDF is needed is 
because the implicitness of relationships is not something that is 
bothering people in the XML world since the missing logic is normally 
hardcoded in the application that create and digest a particular XML schema.

Coming from that camp, I can tell you that once you start publishing 
data without knowing how others are going to use it, well, you do find 
XML pretty limiting.

Take this fragment

  <1 xmlns="urn:blah:" rdf:about="urn:blah:0">
    <2>blah</2>
  </1>

let's now interpret it as XML. What is the relationship between 
urn:blah:1 and urn:blah:2? well, "isContainedIn" is the only 
relationship that we can infer, but what did the schema author wanted to 
imply with this nesting? behavior? property? denomination?

Who knows.

[if you think this is never the case, imagine to receive a SOAP envelope 
with a properly namespaced chinese payload and imagine writing the code 
that handles that!]

Now interpret the above as RDF/XML, it says:

  - there is a resource "urn:blah:0"
  - this resource has type "urn:blah:1"
  - this resource has a relationship urn:blah:2 with a literal value of 
"blah"

same syntax, different models. With RDF, the readers of your data can 
guess less and know more.

Is this enough to solve the semantic interoperability problem? not at 
all, but it's a step forward.

In short, if you can't send logic along with your data (a big security 
threat these days!), you have to encode it somehow.

RDF helps.

-- 
Stefano.
Received on Friday, 12 November 2004 20:12:09 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:14:56 UTC