[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: What is declarative XML? (And what's not)

  • From: Dan Brickley <danbri@danbri.org>
  • To: "Costello, Roger L." <costello@mitre.org>
  • Date: Mon, 01 Jun 2009 10:56:03 +0200

Re:  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]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.