My thoughts on mapping RDDL to RDF came together tonight in the form of an XSLT transformation... http://www.w3.org/2003/12/rdf-in-xhtml-xslts/grokRDDL.xsl $Id: grokRDDL.xsl,v 1.1 2004/01/16 03:02:34 connolly Exp $ interpret RDDL as RDF. I started with the RDDL draft that seemed to be current per the issues list http://www.w3.org/2001/tag/issues.html?type=1#namespaceDocument-8 --> http://www.tbray.org/tag/rddl4.html and worked out the design I had in mind when I raised objections to the earlier mapping... Re: RDDL again Date: 09 Jun 2003 10:42:04 -0500 Message-Id: <1055173324.8317.19.camel@dirk.dm93.org> http://lists.w3.org/Archives/Public/www-tag/2003Jun/0017.html And I tested it thusly... $ xsltproc grokRDDL.xsl ,rddl4.html >,xxx.rdf $ python ~/swap/cwm.py --rdf ,xxx.rdf --n3 >,xxx.n3 (where swap is http://www.w3.org/2000/10/swap/) and I get statements that I agree with: [[[ <http://www.ietf.org/rfc/rfc2396.txt> rddl:nature <http://www.isi.edu/in-notes/iana/assignments/media-types/text/plain> . rddl: :directory rddl:home, rddl:natures, rddl:purposes; :normative-reference <http://www.ietf.org/rfc/rfc2396.txt>, <http://www.w3.org/TR/REC-xml-names>, <http://www.w3.org/TR/xhtml-basic>, <http://www.w3.org/TR/xml-infoset/>, <http://www.w3.org/TR/xmlbase/>, <http://www.w3.org/tr/xptr>; :reference <http://www.w3.org/TR/xhtml-modularization/>, <http://www.w3.org/tr/xhtml1> . ]]] That's an excerpt from ,xxx.n3 which is attached in full with the namespace prefixes and all that. If I pretty-print the .rdf thusly... $ python ~/swap/cwm.py --rdf ,xxx.rdf >,xxx2.rdf I get something not too bad looking... [[[ <rdf:Description rdf:about="http://www.ietf.org/rfc/rfc2396.txt"> <rddl:nature rdf:resource="http://www.isi.edu/in-notes/iana/assignments/media-types/text/plain"/> </rdf:Description> <rdf:Description rdf:about="http://www.rddl.org/"> <directory rdf:resource="http://www.rddl.org/home"/> <directory rdf:resource="http://www.rddl.org/natures"/> <directory rdf:resource="http://www.rddl.org/purposes"/> <normative-reference rdf:resource="http://www.ietf.org/rfc/rfc2396.txt"/> <normative-reference rdf:resource="http://www.w3.org/TR/REC-xml-names"/> <normative-reference rdf:resource="http://www.w3.org/TR/xhtml-basic"/> <normative-reference rdf:resource="http://www.w3.org/TR/xml-infoset/"/> <normative-reference rdf:resource="http://www.w3.org/TR/xmlbase/"/> <normative-reference rdf:resource="http://www.w3.org/tr/xptr"/> <reference rdf:resource="http://www.w3.org/TR/xhtml-modularization/"/> <reference rdf:resource="http://www.w3.org/tr/xhtml1"/> </rdf:Description> ]]] ,xxx2.rdf is attached in full too. I have one gripe about the rddl4 design: it doesn't say how to indicate what namespace you're talking about; i.e. how to pick out... http://www.rddl.org/ from | ... identified by the URI <code>http://www.rddl.org/</code> I kludged it in the XSLT thusly: <!-- @@KLUDGE! but we need some way to find out what namespace we're talking about --> <xsl:variable name='subjectNamespace' select='/h:html//h:code[starts-with(., "http://")]/text()'/> What's a good way to mark this up? Something like <code class="theNameSpace">http://www.rddl.org/</code> would work... or we could make a 'self' purpose and use that... <a href="http://www.rddl.org/" rddl:purpose="http://www.rddl.org/purposes#self">http://www.rddl.org/ In sum, I like rddl4 but for 1. Some pending edits we've discussed: - a hello-world example - DTD foo - a MIME type registration 2. a normative mapping to RDF, for which I propose grokRDDL.xsl (with the "this namespace" kludge fixed) as a reference implementation 3. Discussion of the use of RDDL in HTTP 300 "multiple choices" responses: "the response SHOULD include an entity containing a list of resource characteristics and location(s) from which the user or user agent can choose the one most appropriate." -- http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.1 4. a fragment indirection mechanism as discussed in vancouver http://www.w3.org/2003/07/21-tag-summary.html My thoughts on fragment indirection haven't come together yet. -- Dan Connolly, W3C http://www.w3.org/People/Connolly/ #Processed by Id: cwm.py,v 1.144 2003/09/14 20:20:20 timbl Exp # using base file:/home/w3.org/w3ccvs/WWW/2003/12/rdf-in-xhtml-xslts/,xxx.rdf # Notation3 generation by # notation3.py,v 1.148 2003/12/04 21:20:17 timbl Exp # Base was: file:/home/w3.org/w3ccvs/WWW/2003/12/rdf-in-xhtml-xslts/,xxx.rdf @prefix : <http://www.rddl.org/purposes#> . @prefix cc: <http://web.resource.org/cc/> . @prefix dc: <http://purl.org/dc/elements/1.1/> . @prefix dt: <http://www.w3.org/2001/XMLSchema#> . @prefix h: <http://www.w3.org/1999/xhtml> . @prefix rddl: <http://www.rddl.org/> . @prefix rddln: <http://www.rddl.org/natures#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . <http://www.ietf.org/rfc/rfc2396.txt> rddl:nature <http://www.isi.edu/in-notes/iana/assignments/media-types/text/plain> . rddl: :directory rddl:home, rddl:natures, rddl:purposes; :normative-reference <http://www.ietf.org/rfc/rfc2396.txt>, <http://www.w3.org/TR/REC-xml-names>, <http://www.w3.org/TR/xhtml-basic>, <http://www.w3.org/TR/xml-infoset/>, <http://www.w3.org/TR/xmlbase/>, <http://www.w3.org/tr/xptr>; :reference <http://www.w3.org/TR/xhtml-modularization/>, <http://www.w3.org/tr/xhtml1> . rddl:home rddl:nature rddl: . rddl:natures rddl:nature rddl: . rddl:purposes rddl:nature rddl: . <http://www.rddl.org/xrd.css> rddl:nature <http://www.isi.edu/in-notes/iana/assignments/media-types/text/css> . <http://www.w3.org/TR/REC-xml-names> rddl:nature <http://www.w3.org/TR/html4/> . <http://www.w3.org/TR/xhtml-basic> rddl:nature <http://www.w3.org/1999/xhtml> . <http://www.w3.org/TR/xhtml-modularization/> rddl:nature <http://www.w3.org/1999/xhtml> . <http://www.w3.org/TR/xml-infoset/> rddl:nature <http://www.w3.org/1999/xhtml> . <http://www.w3.org/TR/xmlbase/> rddl:nature <http://www.w3.org/TR/html4/> . <http://www.w3.org/tr/xhtml1> rddl:nature <http://www.w3.org/1999/xhtml> . <http://www.w3.org/tr/xptr> rddl:nature <http://www.w3.org/TR/html4/> . #ENDS <!-- Processed by Id: cwm.py,v 1.144 2003/09/14 20:20:20 timbl Exp --> <!-- using base file:/home/w3.org/w3ccvs/WWW/2003/12/rdf-in-xhtml-xslts/,xxx.rdf--> <rdf:RDF xmlns="http://www.rddl.org/purposes#" xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dt="http://www.w3.org/2001/XMLSchema#" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:log="http://www.w3.org/2000/10/swap/log#" xmlns:rddl="http://www.rddl.org/" xmlns:rddln="http://www.rddl.org/natures#" xmlns:rddlp="http://www.rddl.org/purposes#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="http://www.ietf.org/rfc/rfc2396.txt"> <rddl:nature rdf:resource="http://www.isi.edu/in-notes/iana/assignments/media-types/text/plain"/> </rdf:Description> <rdf:Description rdf:about="http://www.rddl.org/"> <directory rdf:resource="http://www.rddl.org/home"/> <directory rdf:resource="http://www.rddl.org/natures"/> <directory rdf:resource="http://www.rddl.org/purposes"/> <normative-reference rdf:resource="http://www.ietf.org/rfc/rfc2396.txt"/> <normative-reference rdf:resource="http://www.w3.org/TR/REC-xml-names"/> <normative-reference rdf:resource="http://www.w3.org/TR/xhtml-basic"/> <normative-reference rdf:resource="http://www.w3.org/TR/xml-infoset/"/> <normative-reference rdf:resource="http://www.w3.org/TR/xmlbase/"/> <normative-reference rdf:resource="http://www.w3.org/tr/xptr"/> <reference rdf:resource="http://www.w3.org/TR/xhtml-modularization/"/> <reference rdf:resource="http://www.w3.org/tr/xhtml1"/> </rdf:Description> <rdf:Description rdf:about="http://www.rddl.org/home"> <rddl:nature rdf:resource="http://www.rddl.org/"/> </rdf:Description> <rdf:Description rdf:about="http://www.rddl.org/natures"> <rddl:nature rdf:resource="http://www.rddl.org/"/> </rdf:Description> <rdf:Description rdf:about="http://www.rddl.org/purposes"> <rddl:nature rdf:resource="http://www.rddl.org/"/> </rdf:Description> <rdf:Description rdf:about="http://www.rddl.org/xrd.css"> <rddl:nature rdf:resource="http://www.isi.edu/in-notes/iana/assignments/media-types/text/css"/> </rdf:Description> <rdf:Description rdf:about="http://www.w3.org/TR/REC-xml-names"> <rddl:nature rdf:resource="http://www.w3.org/TR/html4/"/> </rdf:Description> <rdf:Description rdf:about="http://www.w3.org/TR/xhtml-basic"> <rddl:nature rdf:resource="http://www.w3.org/1999/xhtml"/> </rdf:Description> <rdf:Description rdf:about="http://www.w3.org/TR/xhtml-modularization/"> <rddl:nature rdf:resource="http://www.w3.org/1999/xhtml"/> </rdf:Description> <rdf:Description rdf:about="http://www.w3.org/TR/xml-infoset/"> <rddl:nature rdf:resource="http://www.w3.org/1999/xhtml"/> </rdf:Description> <rdf:Description rdf:about="http://www.w3.org/TR/xmlbase/"> <rddl:nature rdf:resource="http://www.w3.org/TR/html4/"/> </rdf:Description> <rdf:Description rdf:about="http://www.w3.org/tr/xhtml1"> <rddl:nature rdf:resource="http://www.w3.org/1999/xhtml"/> </rdf:Description> <rdf:Description rdf:about="http://www.w3.org/tr/xptr"> <rddl:nature rdf:resource="http://www.w3.org/TR/html4/"/> </rdf:Description> </rdf:RDF>Received on Thursday, 15 January 2004 23:46:11 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:47:23 GMT