Index of /2001/04rs22

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory  -  
[   ]Makefile2001-10-10 19:55 1.6K 
[TXT]README.html2001-05-30 23:26 5.9K 
[   ]aboutEachC1-noAE.rdf2001-05-18 23:06 909  
[   ]aboutEachC1-noCol.rdf2001-05-18 23:06 558  
[   ]aboutEachC1.rdf2001-05-18 20:52 399  
[   ]aboutEachImp.rdf2001-05-21 15:03 933  
[TXT]aboutEachRules.n32001-05-21 15:03 802  
[   ]aboutEachSpecEx.rdf2001-05-18 20:52 414  
[   ]aboutEachSugar.xsl2001-05-18 20:52 3.3K 
[   ]colSugar.xsl2001-05-18 21:07 2.2K 
[   ]confusedPrefixes.rdf2001-05-24 14:55 475  
[TXT]dc-filter-maker.n32001-05-21 15:03 393  
[TXT]dc-filter-top.n32001-05-21 15:03 100  
[TXT]dc-filter.n32001-05-21 15:03 3.8K 
[   ]dces.rdf2001-05-18 23:06 9.6K 
[   ]fixAttrs.xsl2001-05-24 14:55 1.4K 
[   ]fixedAttrs.rdf2001-05-24 14:55 589  
[   ]litSugar.xsl2001-10-10 19:35 1.5K 
[   ]rdf-mathlit-noLit.nt2001-10-10 19:55 12K 
[   ]rdf-mathlit-noLit.rdf2001-10-10 19:55 7.0K 
[   ]rdf-mathlit.rdf2001-10-10 19:55 573  
[   ]rdf0.rdf2001-04-17 05:48 87  
[   ]rdf0.xsd2001-04-17 05:48 1.1K 
[   ]rdf0e.rdf2001-04-17 05:48 112  
[   ]rdf1.rdf2001-04-17 05:48 293  
[   ]rdf1.xsd2001-04-17 05:48 2.5K 
[   ]spec.xsl2001-05-25 19:38 80K 

RDF Syntax: An XML Schema/XSLT Approach

RDF Syntax: An XML Schema/XSLT Approach

Using the online XSV service, we can see the results of checking that rdf1.rdf conforms to rdf1.xsd. Checking rdf0e.xsd shows that it does not conform.

see also: earlier (Aug 2000) approach, among the semantic web advanced development materials.

Lowering the Syntactic Sugar in RDF Documents

The XML Schema approach above only covers the simplest parts of RDF syntax. But much of the rest of the syntax of RDF 1.0 doesn't add any expressive capability. Just to prove the point (and to reduce the burden on some of my tools that read RDF) I've implemented (the start of) an XSLT transformation that eliminates RDF collection syntactic sugar: colSugar.xsl. The Makefile shows how to run the simple test case that it passes:

aboutEachC1-noCol.rdf: aboutEachC1.rdf colSugar.xsl
	$(XSLT) aboutEachC1.rdf colSugar.xsl $@

Using our online XSLT service, you can try it out on any RDF document available via HTTP:

Address of RDF input

Fixing broken/deprecated syntax

One of the myths about XML namespaces plauges RDF. Examples in the RDF specification such as:

  <rdf:Description about=""
                   s:Creator="Ora Lassila" />

and some of the early RDF implementations suggest that unprefixed attributes are qualified with the namespace name of the element the attribute appears on. In the RDF Interest group and the RDF Core Working Group, this is known asissue rdf-ns-prefix-confusion.

fixAttrs.xsl transforms documents that use this broken/deprecated syntax into what they were probably intended to mean.

Address of RDF input
fixedAttrs.rdf: fixAttrs.xsl confusedPrefixes.rdf
	$(XSLT) confusedPrefixes.rdf fixAttrs.xsl $@
	$(TIDY) -i -m -xml $@

An interpretation of aboutEach

Consider aboutEachC1.rdf:

  <rdf:Bag rdf:ID="books">
    <rdf:li rdf:resource="#book1" />

    <rdf:li rdf:resource="#book2" />

    <rdf:li rdf:resource="#book3" />

  <rdf:Description rdf:aboutEach="#books">
    <dc:rights>all mine!</dc:rights>

In the RDF 1.0 spec, we see...

No explicit graph representation of distributive referents is defined.
3.3. Distributive Referents: Statements about Members of a Container

But the use of URIs to point from a bag of properties to the collection of things that have those properties suggests that aboutEach could work across files. I suggest we consider rdf:aboutEach to be two things: (1) a bit of syntactic sugar, and (2) a rule that applies to each member of a collection.

The sugar represents a collection of properties and objects as a description element with an aboutEach attribute; it's implemented (at least in part) by aboutEachSugar.xsl. To see this sugar unwound, see the next stanza of the makefile:

aboutEachC1-noAE.rdf: aboutEachC1-noCol.rdf aboutEachSugar.xsl
	$(XSLT) aboutEachC1-noCol.rdf aboutEachSugar.xsl $@
	$(TIDY) -i -m -xml $@

The rule for what this graph representation of aboutEach implies is:

<> log:forAll v:nx, v:ny, v:rdesc, v:col, v:p, v:o, v:elt.

{ v:nx a rdfs:ContainerMembershipProperty.
  v:ny a rdfs:ContainerMembershipProperty.

  v:rdesc v:nx [ rdf:predicate v:p; rdf:object v:o ].

  v:rdesc rdf:aboutEach v:col.

  v:col v:ny v:elt.
  log:implies { v:elt v:p v:o }.

@@write-up interrupted here

Dan Connolly
$Revision: 1.9 $ of $Date: 2001/05/30 23:26:06 $ by $Author: connolly $