Re: My action item on RDDL/RDF

Tim Bray wrote:
> ...
> I'm unconvinced that this really buys anything, but it's probably cheap 
> to assert that this RDDL applies to namespace X; obviously you have to 
> be able to claim to belong to more than one namespace.

Why?

 > ...  And it's hard to
> see what the harm is as long as the back-pointer isn't compulsory.  So 
> in RDF-speak, what's the triple?  What has the property named 
> "servesAsRDDLFor" whose value is some namespace name?

We must be talking past each other. What I want could probably be 
handled just through a statement that RDDL documents SHOULD have an XML 
Base declaration (assuming RDF knows what to do with it).

>...
> Well, if you think of a namespace as a resource then a RDDL is a 
> representation of that resource, so that establishes one end of the 
> relationship.

Not in a way that will be accessible to RDF processors. They have no 
notion of the relationship between resource and representation, AFAIK.

> ...  The RDDL then says that particular other resources have 
> properties such as Nature and Purpose, their related-ness is inferred 
> from their containment in the representation.

Once again, I don't see how a generic RDF processor will infer this. My 
mental model is that I point a generic RDF processor at the namespace 
document and then use it as a namespace-information database (perhaps 
doing queries using a generic RDF query language). It shouldn't have to 
know anything specific about RDDL anymore than my XML parser should have 
to be programmed specifically to handle RDDL.

> ...  At no point has RDDL ever 
> built in syntax to assert the relationship of these resources to the 
> namespace, since any reasonable person will point out that this can be 
> inferred from its being in the representation of the namespace.

I'm not worried about people, I'm worried about machines. Machine 
understanding is the *only* reason to use RDF instead of idiomatic XML 
or even raw text. And of course I'm using "understanding" to mean rougly 
"the ability to build graphs and draw inferences."

>...
> First of all check out one of Jonathan's sketches at 
> http://www.rddl.org/RDDL2, which shows off some of his thinking.  If I 
> have something like (in N3)
> 
> <> <http://www.rddl.org/purposes#schema-validation> <L.dtd>
> 
> How do I infer that this is a purpose, especially if you cook up your 
> own purposes like
> 
> <> <http://prescod.net/purposes#transmogrify> <L.transmog>

Answer #1: Read the OWL ontology for RDF resources.

Answer #2: Add a thin layer of indirection.

@prefix : <http://www.prescod.net/sometargetns#>.
@prefix rddl: <http://www.rddl.org/>.

<http://www.prescod.net/sometargetns#>
	has <rddl:resource> <#dtd>;
         has <rddl:resource> <#relaxng>;
         has <rddl:resource> <#xhtml>.

<#dtd> has <rddl:title> "DTD";
     has <rddl:description> "A DTD for the L language.";
     has <rddl:href> <http://example.org/schemas/L.dtd>;
     has <rddl:purpose> <http://www.rddl.org/purposes#validation>;
     has <rddl:nature> 
<http://www.isi.edu/in-notes/iana/assignments/media-types/application/xml-dtd> 
.

<#relaxng> has <rddl:title> "Relax NG Schema";
     has <rddl:description> "A Relax NG Schema for the L language.";
     has <rddl:href> <http://example.org/schemas/L.rng>;
     has <rddl:purpose> <http://www.rddl.org/purposes#validation> ;
     has <rddl:nature> <http://relaxng.org/ns/structure/1.0>.

<#xhtml> has <rddl:title> "User Documentation";
     has <rddl:description> "Reference documentatin for L, in XHTML.";
     has <rddl:href> <http://example.org/schemas/L.html>;
     has <rddl:purpose> <http://www.rddl.org/purposes#reference>;
     has <rddl:nature> <http://www.w3.org/1999/xhtml> .

> Right now, in both the simple XLink and RDF formulations, it's easy to 
> use nature/purpose as a two-part key to look up what you want, and 
> people seem to like this approach.

I agree. Given a semantic web query language or API, it should be 
similarly easy to look up a DTD for validation. Here's a CWM "query" 
that finds the description for the Relax NG associated with the 
namespace (if any):


this log:forAll :x, :desc.
{<http://www.prescod.net/sometargetns#> has <rddl:resource> :x.
        :x has <rddl:nature> <http://relaxng.org/ns/structure/1.0>.
        :desc is <rddl:description> of :x.
}
     log:implies {:x log:outputString :desc.}.

And here's one to print out all of the titles of the various ways to 
validate:


this log:forAll :x, :desc.
{<http://www.prescod.net/sometargetns#> has <rddl:resource> :x.
        :x has <rddl:purpose> <http://www.rddl.org/purposes#validation>.
        :desc is <rddl:title> of :x.
}
     log:implies {:x log:outputString :desc.}.

>> Second, this is just further evidence that RDF/XML is broken.
> 
> 
> I increasingly agree.  Every time I try to write something down in 
> RDF/XML I get tied in knots; N3 is immensely better.  Either XML is just 
> the wrong syntax for RDF, or the design of the current syntax is 
> hopelessly hosed. -Tim

I think that this is roughly what the N3 would translate into as RDF.

<rdf:RDF
     xmlns:rddl="http://www.rddl.org/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

     <rdf:Description rdf:about="http://www.prescod.net/sometargetns#">
         <rddl:resource
             rdf:resource="#dtd"/>
         <rddl:resource
             rdf:resource="#relaxng"/>
         <rddl:resource
             rdf:resource="#xhtml"/>
     </rdf:Description>

     <rdf:Description rdf:ID="dtd">
         <rddl:description>A DTD for the L language.</rddl:description>
         <rddl:href rdf:resource="http://example.org/schemas/L.dtd"/>
         <rddl:nature 
rdf:resource="http://www.isi.edu/in-notes/iana/assignments/media-types/application/xml-dtd"/>
         <rddl:purpose 
rdf:resource="http://www.rddl.org/purposes#validation"/>
         <rddl:title>DTD</rddl:title>
     </rdf:Description>

     <rdf:Description rdf:ID="relaxng">
         <rddl:description>A Relax NG Schema for the L 
language.</rddl:description>
         <rddl:href
             rdf:resource="http://example.org/schemas/L.rng"/>
         <rddl:nature"
             rdf:resource="http://relaxng.org/ns/structure/1.0"/>
         <rddl:purpose
             rdf:resource="http://www.rddl.org/purposes#validation"/>
         <rddl:title xmlns="rddl:">Relax NG Schema</rddl:title>
     </rdf:Description>

     <rdf:Description rdf:ID="xhtml">
         <rddl:description>Reference documentatin for L, in 
XHTML.</rddl:description>
         <rddl:href
             rdf:resource="http://example.org/schemas/L.html"/>
         <rddl:nature
             rdf:resource="http://www.w3.org/1999/xhtml"/>
         <rddl:purpose
             rdf:resource="http://www.rddl.org/purposes#reference"/>
         <rddl:title xmlns="rddl:">User Documentation</rddl:title>
     </rdf:Description>

</rdf:RDF>

Received on Monday, 11 November 2002 15:25:35 UTC