中国XML论坛--RDF与XML的区别是什么(补充)?

来源:百度文库 编辑:神马文学网 时间:2024/04/29 01:40:58
继续补充:RDF 相比于XML的一个很大的有点是它的语法自由,它不像XML有个XML Schema来约束它的语法,这使得RDF具有良好得互操作性。
It‘s best to tend to think of RDF as what it is: another language, just as SVG is, rather than viewing it simply as XML surrounded in rdf:RDF tags.
With XML, you expect to get a tree with its elements in a predictable order. If an expected element is missing, then it tends to render your whole XML document invalid with respect to the schema you are using. If an element you don‘t expect to be there is present, then again your document becomes invalid. With RDF, you have no particular expectations; if the particular strand of spaghetti you‘re looking for isn‘t there, the rest of the ball remains. If there are new strands you don‘t expect, you won‘t even notice their presence if you don‘t go looking for them.
The big advantage of being failure-friendly is the enhancement of interoperability. Consider what happens if you add a new property to your description of my weblog and it becomes like this:
‘>http://usefulinc.com/edd/blog">
Behind the times
10

My "find the title" processor can still deal with your description just fine, as all it cares about is the dc:title property. All RDF processors are automatically future compatible, and all RDF descriptions are automatically backwards compatible. This is a huge benefit over traditional XML processing.
参考:
【1】 Edd Dumbill Sticking with it -- RDF http://usefulinc.com/edd/blog/contents/2003/08/08-whyrdf/read
【2】 Missing isn‘t broken: data validation and freedom on the Semantic Web http://rdfweb.org/mt/foaflog/archives/000047.html