分享

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

 林枫 2007-07-17
继续补充: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: 
 <rdf:Description rdf:about="‘ target=_blank href_cetemp=‘http:///edd/blog">‘>http:///edd/blog">
   <dc:title>Behind the times</dc:title>
   <example:coolness>10</example:coolness>
 </rdf:Description>
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:///edd/blog/contents/2003/08/08-whyrdf/read
【2】 Missing isn‘t broken: data validation and freedom on the Semantic Web http:///mt/foaflog/archives/000047.html

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多