[namespaceDocument-8] grokRDDL.xsl mapping to RDF

My thoughts on mapping RDDL to RDF came together tonight
in the form of an XSLT transformation...

  $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.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>

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,
         :normative-reference <http://www.ietf.org/rfc/rfc2396.txt>,
         :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">
    <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.w3.org/TR/xhtml-basic"/>
        <normative-reference rdf:resource="http://www.w3.org/tr/xptr"/>
        <reference rdf:resource="http://www.w3.org/tr/xhtml1"/>

,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/"

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

My thoughts on fragment indirection haven't come together yet.

Dan Connolly, W3C http://www.w3.org/People/Connolly/

Received on Thursday, 15 January 2004 23:46:11 UTC