XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] What is declarative XML? (And what's not)


[...]

The vast majority of XML I work with is RDF/XML. I consider that pretty 
purely declarative in that it is a carrier notation for simple logical 
claims. In other words, content that carries logical claims about the 
world that could (at least ideally) be considered true or false, 
informative or un-informative...

One measure of this is the order-insensitivity of the content (if not 
the particular syntax in which that content is communicated).

I can write RDF/XML that says "Dan works at the Organization with a 
homepage http://www.vu.nl/, he is 37, his weblog is 
http://danbri.org/words/";. Or I can re-order those 3 claims. RDF tools 
are pretty oblivious to this ordering, to the extent that users of RDF 
query languages and APIs can't rely on it being preserved once the XML 
markup is parsed and handed to RDF layers of processing. This is because 
there should be no circumstances where the ordering of the claims makes 
any difference to their overall plausibility. The syntax in which we 
write those claims in markup might have rules for ordering, however (eg. 
see rdfa below).

I don't want to suggest that RDF is the ultimate in declarative content; 
there are certainly other traditions and approaches. But being reducable 
to simple document-order-independent logical claims seems a useful 
measure of declarativeness (declarativity?). That said, it's hard to 
quantify.

Compare an RDF/XML document and an RDFa/XHTML doc that "said they same 
thing" from an RDF perspective:

<Person xmlns="http://xmlns.com/foaf/0.1/"; 
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";>
<weblog rdf:resource="http://danbri.org/words/"/>
<workplaceHomepage rdf:resource="http://www.vu.nl/"/>
<age>37</age>
</Person>

vs

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" 
"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd";>
  <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en">
  <head><title>RDFa example</title></head>
<body><p typeof="foaf:Person">Dan works at the organization with a 
homepage <a href="http://www.vu.nl/"; 
rel="foaf:workplaceHomepage">www.vu.nl</a>, he is <span 
property="foaf:age">37</span>, his weblog is <a 
href="http://danbri.org/words/"; rel="foaf:weblog">danbri.org/words</a>.</p>
</body>
</html>

In both cases, if I got my syntax right, the documents are carriers for 
the same claims about the thing they describe:

_:x <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> 
<http://xmlns.com/foaf/0.1/Person> .
_:x <http://xmlns.com/foaf/0.1/weblog> <http://danbri.org/words/> .
_:x <http://xmlns.com/foaf/0.1/workplaceHomepage> <http://www.vu.nl/> .
_:x <http://xmlns.com/foaf/0.1/age> "37" .

(rdfa parsers will probably also do something with the title, but forget 
that for now)

Does it make sense to say that either is more declarative? Clearly the 
XHTML/RDFa carries more information for a human or a full-text indexer, 
but there is also a sense in which they carry the same machine-oriented 
payload.

Also re thinking about the HTML, RDFa and human-facing document side of 
this, perhaps also related - some oldish work on XML Accessibility 
Guidelines - http://www.w3.org/TR/xag

cheers,

Dan


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS