CINXE.COM
Index of /2001/04rs22
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head> <title>Index of /2001/04rs22</title> </head> <body> <h1>Index of /2001/04rs22</h1> <table> <tr><th valign="top"><img src="/icons/blank.gif" alt="[ICO]"></th><th>Name</th><th>Last modified</th><th>Size</th><th>Description</th></tr> <tr><th colspan="5"><hr></th></tr> <tr><td valign="top"><img src="/icons/back.gif" alt="[PARENTDIR]"></td><td><a href="/2001/">Parent Directory</a></td><td> </td><td align="right"> - </td><td> </td></tr> <tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]"></td><td><a href="Makefile">Makefile</a></td><td align="right">2001-10-10 19:55 </td><td align="right">1.6K</td><td> </td></tr> <tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]"></td><td><a href="README.html">README.html</a></td><td align="right">2001-05-30 23:26 </td><td align="right">5.9K</td><td> </td></tr> <tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]"></td><td><a href="aboutEachC1-noAE.rdf">aboutEachC1-noAE.rdf</a></td><td align="right">2001-05-18 23:06 </td><td align="right">909 </td><td> </td></tr> <tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]"></td><td><a href="aboutEachC1-noCol.rdf">aboutEachC1-noCol.rdf</a></td><td align="right">2001-05-18 23:06 </td><td align="right">558 </td><td> </td></tr> <tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]"></td><td><a href="aboutEachC1.rdf">aboutEachC1.rdf</a></td><td align="right">2001-05-18 20:52 </td><td align="right">399 </td><td> </td></tr> <tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]"></td><td><a href="aboutEachImp.rdf">aboutEachImp.rdf</a></td><td align="right">2001-05-21 15:03 </td><td align="right">933 </td><td> </td></tr> <tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]"></td><td><a href="aboutEachRules.n3">aboutEachRules.n3</a></td><td align="right">2001-05-21 15:03 </td><td align="right">802 </td><td> </td></tr> <tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]"></td><td><a href="aboutEachSpecEx.rdf">aboutEachSpecEx.rdf</a></td><td align="right">2001-05-18 20:52 </td><td align="right">414 </td><td> </td></tr> <tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]"></td><td><a href="aboutEachSugar.xsl">aboutEachSugar.xsl</a></td><td align="right">2001-05-18 20:52 </td><td align="right">3.3K</td><td> </td></tr> <tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]"></td><td><a href="colSugar.xsl">colSugar.xsl</a></td><td align="right">2001-05-18 21:07 </td><td align="right">2.2K</td><td> </td></tr> <tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]"></td><td><a href="confusedPrefixes.rdf">confusedPrefixes.rdf</a></td><td align="right">2001-05-24 14:55 </td><td align="right">475 </td><td> </td></tr> <tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]"></td><td><a href="dc-filter-maker.n3">dc-filter-maker.n3</a></td><td align="right">2001-05-21 15:03 </td><td align="right">393 </td><td> </td></tr> <tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]"></td><td><a href="dc-filter-top.n3">dc-filter-top.n3</a></td><td align="right">2001-05-21 15:03 </td><td align="right">100 </td><td> </td></tr> <tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]"></td><td><a href="dc-filter.n3">dc-filter.n3</a></td><td align="right">2001-05-21 15:03 </td><td align="right">3.8K</td><td> </td></tr> <tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]"></td><td><a href="dces.rdf">dces.rdf</a></td><td align="right">2001-05-18 23:06 </td><td align="right">9.6K</td><td> </td></tr> <tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]"></td><td><a href="fixAttrs.xsl">fixAttrs.xsl</a></td><td align="right">2001-05-24 14:55 </td><td align="right">1.4K</td><td> </td></tr> <tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]"></td><td><a href="fixedAttrs.rdf">fixedAttrs.rdf</a></td><td align="right">2001-05-24 14:55 </td><td align="right">589 </td><td> </td></tr> <tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]"></td><td><a href="litSugar.xsl">litSugar.xsl</a></td><td align="right">2001-10-10 19:35 </td><td align="right">1.5K</td><td> </td></tr> <tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]"></td><td><a href="rdf-mathlit-noLit.nt">rdf-mathlit-noLit.nt</a></td><td align="right">2001-10-10 19:55 </td><td align="right"> 12K</td><td> </td></tr> <tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]"></td><td><a href="rdf-mathlit-noLit.rdf">rdf-mathlit-noLit.rdf</a></td><td align="right">2001-10-10 19:55 </td><td align="right">7.0K</td><td> </td></tr> <tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]"></td><td><a href="rdf-mathlit.rdf">rdf-mathlit.rdf</a></td><td align="right">2001-10-10 19:55 </td><td align="right">573 </td><td> </td></tr> <tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]"></td><td><a href="rdf0.rdf">rdf0.rdf</a></td><td align="right">2001-04-17 05:48 </td><td align="right"> 87 </td><td> </td></tr> <tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]"></td><td><a href="rdf0.xsd">rdf0.xsd</a></td><td align="right">2001-04-17 05:48 </td><td align="right">1.1K</td><td> </td></tr> <tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]"></td><td><a href="rdf0e.rdf">rdf0e.rdf</a></td><td align="right">2001-04-17 05:48 </td><td align="right">112 </td><td> </td></tr> <tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]"></td><td><a href="rdf1.rdf">rdf1.rdf</a></td><td align="right">2001-04-17 05:48 </td><td align="right">293 </td><td> </td></tr> <tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]"></td><td><a href="rdf1.xsd">rdf1.xsd</a></td><td align="right">2001-04-17 05:48 </td><td align="right">2.5K</td><td> </td></tr> <tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]"></td><td><a href="spec.xsl">spec.xsl</a></td><td align="right">2001-05-25 19:38 </td><td align="right"> 80K</td><td> </td></tr> <tr><th colspan="5"><hr></th></tr> </table> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>RDF Syntax: An XML Schema/XSLT Approach</title> </head> <body> <h1>RDF Syntax: An XML Schema/XSLT Approach</h1> <p>Using the <a href="https://www.w3.org/2001/03/webdata/xsv">online XSV service</a>, we can see the <a href="https://www.w3.org/2001/03/webdata/xsv?docAddrs=http%3A%2F%2Fwww.w3.org%2F2001%2F04rs22%2Frdf1.rdf+http%3A%2F%2Fwww.w3.org%2F2001%2F04rs22%2Frdf1.xsd&style=offline">results</a> of checking that <a href="rdf1.rdf">rdf1.rdf</a> conforms to <a href="rdf1.xsd">rdf1.xsd</a>. <a href="https://www.w3.org/2001/03/webdata/xsv?docAddrs=http%3A%2F%2Fwww.w3.org%2F2001%2F04rs22%2Frdf0e.rdf+http%3A%2F%2Fwww.w3.org%2F2001%2F04rs22%2Frdf1.xsd&style=offline">Checking rdf0e.xsd</a> shows that it does not conform. </p> <p>see also: <a href="../../2000/07/DAML-0-5-syntax">earlier (Aug 2000) approach</a>, among the <a href="../../2000/01/sw/">semantic web advanced development materials</a>.</p> <h2>Lowering the Syntactic Sugar in RDF Documents</h2> <p>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: <a href="colSugar.xsl">colSugar.xsl</a>. The Makefile shows how to run the simple test case that it passes: </p> <pre> <a href="aboutEachC1-noCol.rdf">aboutEachC1-noCol.rdf</a>: <a href="aboutEachC1.rdf">aboutEachC1.rdf</a> <a href="colSugar.xsl">colSugar.xsl</a> $(XSLT) <a href="aboutEachC1.rdf">aboutEachC1.rdf</a> <a href="colSugar.xsl">colSugar.xsl</a> $@ </pre> <p>Using our online <a href="../05/xslt">XSLT service</a>, you can try it out on any RDF document available via HTTP:</p> <form method="GET" action="/2000/06/webdata/xslt"> <input type="hidden" name="xslfile" value="http://www.w3.org/2001/04rs22/colSugar.xsl"/> Address of RDF input <input type="text" name="xmlfile" size="50" value="http://www.w3.org/2001/04rs22/aboutEachC1.rdf" /><br class=''/> <input type="submit" name="transform" value="Get Results"/> </form> <div> <h2><a name="fixatt">Fixing broken/deprecated syntax</a></h2> <p><a href=" http://www.xml.com/pub/2000/03/08/namespaces/myth1.html#myth4">One of the myths about XML namespaces</a> plauges RDF. Examples in the RDF specification such as:</p> <pre> <rdf:RDF> <rdf:Description about="http://www.w3.org/Home/Lassila" s:Creator="Ora Lassila" /> </rdf:RDF> </pre> <p>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 <a href="https://www.w3.org/2000/03/rdf-tracking/#rdf-ns-prefix-confusion">rdf-ns-prefix-confusion</a>.</p> <p><a href="fixAttrs.xsl">fixAttrs.xsl</a> transforms documents that use this broken/deprecated syntax into what they were probably intended to mean.</p> <form method="GET" action="/2000/06/webdata/xslt"> <input type="hidden" name="xslfile" value="http://www.w3.org/2001/04rs22/fixAttrs.xsl"/> Address of RDF input <input type="text" name="xmlfile" size="50" value="http://www.w3.org/2001/04rs22/aboutEachC1.rdf" /><br class=''/> <input type="submit" name="transform" value="Get Results"/> </form> <pre> <a href="fixedAttrs.rdf">fixedAttrs.rdf</a>: <a href="fixAttrs.xsl">fixAttrs.xsl</a> <a href="confusedPrefixes.rdf">confusedPrefixes.rdf</a> $(XSLT) <a href="confusedPrefixes.rdf">confusedPrefixes.rdf</a> <a href="fixAttrs.xsl">fixAttrs.xsl</a> $@ $(TIDY) -i -m -xml $@ </pre> </div> <h2><a name="ae">An interpretation of aboutEach</a></h2> <p>Consider <a href="aboutEachC1.rdf">aboutEachC1.rdf</a>:</p> <pre> <rdf:Bag rdf:ID="books"> <rdf:li rdf:resource="#book1" /> <rdf:li rdf:resource="#book2" /> <rdf:li rdf:resource="#book3" /> </rdf:Bag> <rdf:Description rdf:aboutEach="#books"> <dc:rights>all mine!</dc:rights> </rdf:Description> </pre> <p>In the RDF 1.0 spec, we see...</p> <blockquote> No explicit graph representation of distributive referents is defined. <address> <a href="https://www.w3.org/TR/REC-rdf-syntax/#containers">3.3. Distributive Referents: Statements about Members of a Container</a> </address> </blockquote> <p>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.</p> <p>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 <a href="aboutEachSugar.xsl">aboutEachSugar.xsl</a>. To see this sugar unwound, see the next stanza of the makefile:</p> <pre> <a href="aboutEachC1-noAE.rdf">aboutEachC1-noAE.rdf</a>: <a href="aboutEachC1-noCol.rdf">aboutEachC1-noCol.rdf</a> <a href="aboutEachSugar.xsl">aboutEachSugar.xsl</a> $(XSLT) <a href="aboutEachC1-noCol.rdf">aboutEachC1-noCol.rdf</a> <a href="aboutEachSugar.xsl">aboutEachSugar.xsl</a> $@ $(TIDY) -i -m -xml $@ </pre> <p>The rule for what this graph representation of aboutEach implies is:</p> <pre> <> 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 }. </pre> <p>@@write-up interrupted here</p> <address> <a href="../../People/Connolly/">Dan Connolly</a><br /> <small>$Revision: 1.9 $ of $Date: 2001/05/30 23:26:06 $ by $Author: connolly $</small> </address> </body> </html> </body></html>