Re: Another RDDL/RDF proposal

More RDF/XML explanations and primer for Paul below... sorry ...

>>>Paul Prescod said:
> 
> Tim Bray wrote:
> >...
> > 
> > The notion that you limit a RDDL to apply to one and only one namespace 
> > seems like a totally artificial limitation that buys nothing and 
> > eliminates interesting possibilities.
> 
> In the end, this is easy to achieve if the namespace is the referent of 
> the rdf:about.
> 
> >...
> > Aahhh... the RDF tax strikes again.  I want to do something that is 
> > obvious and straightforward and implicit in the resource/representation 
> > relationship, and using RDF is going to cost me oceans of arcane totally 
> > human-opaque syntax.
> 
> Every level of abstraction is going to have _some_ tax unless you do it 
> totally out-of-line. It's one thing when the RDF tax is just extra 
> syntax but in this case we're talking about being explicit in order to 
> _get the benefits_ of RDF.
> 
> >...
> > A machine is entirely capable of detecting the condition that some 
> > assertions are contained in the representation of a resource and 
> > inferring the fact that the assertions are related to the resource.  It 
> > should not be necessary to duplicate the assertion of this 
> > machine-detectable relationship. -Tim
> 
> Machines are not intelligent. They detect things only when they are told 
> to. I am suggesting to use standard RDF technique so that the programmer 
> does not have to hack around the natural behaviour of the RDF processor.

Seems fine so far

> Please consider this alternative, which I think has the following virtues:
> 
>   * fewer elements in RDF namespace
> 
>   * more explicit about what resources are being related,
> 
>   * no contradiction problems (scope of nature/purpose declarations are 
> clear and correct)
> 
>   * naturally permits multiple namespace declarations from the same RDDL
> 
>   * permits these multiple declarations to share as much or as little as 
> they like.
> 
>   * naturally permits the addition of non-resource annotations on the 
> namespace (like who owns it, what its usage policies are, etc.)
> 
>   * naturally permits the same markup to live in documents that are NOT 
> served from namespace URIs
> 
> The only down-side I see is that it probably forces you to move the 
> hacky HTML paragraph-elements further away from the RDF, because of 
> RDF's problem with mixed content. :(

It's downside is that it (your example below) isn't RDF/XML, but some
other thing, since it doesn't match the grammar.  That's fine as an
experiment.

And please, stick to RDF/XML when talking about the XML syntax
and RDF when talking about the graph.  It is slippery enough trying
to follow this.

"RDF[/XML]'s problem with mixed content" again with no explanation of
the problem.  You can have mixed content in RDF/XML, I've said that
several times.  Your seem to be the one with the problem about that.

To make this clear to you, I'll give you a pointer to the
specification and given an example of how to use it.

Here is a pointer to how to put XML content at end of an RDF property arc: 
   http://www.w3.org/TR/rdf-syntax-grammar/#section-Syntax-XML-literals
(it happens not to be mixed content in the example there; it could
easily have been, I could change it).  So mixed content could be:

<ex:prop rdf:parseType="Literal"
             xmlns:a="http://example.org/a#">some stuff here
    <a:Box required="true">
    blah blah <a:widget size="10" /> 
    this is mixed content yes?
  <a:grommit id="23" />
  </a:Box>
blah</ex:prop>

It may not (likely not) meet your definition of "easy", but there it
is, mixed.

The RDF/XML grammar defines it that way too:

  Production literal

  Any XML element content that is allowed according to [XML] definition
  Content of Elements Rule [43] content. in section 3.1 Start-Tags,
  End-Tags, and Empty-Element Tags 

  -- http://www.w3.org/TR/rdf-syntax-grammar/#literal


The example RELAXNG grammar might make that crystal clear:

  parseTypeLiteralPropertyElt = ...
    element * - ( ... lots of stuff elided here ... ) {
       idAttr?, parseLiteral, literal
   }

  literal = any
  any = mixed { element * { attribute * { text }*, any }* }

  -- http://www.w3.org/TR/rdf-syntax-grammar/#section-RELAXNG-Schema


That should answer any problem of how to find where it is defined,
and how to do it.  You can go "yuck" and that's all I can do for you.

> =====
> 
> 
> <html   xmlns:rddl="http://www.rddl.org/"
>          xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
> <head>
> <title>RDDL Description for http://example.org/L</title></head>
> <body>
> <h1>RDDL Description for http://example.org/L</h1>
> 
> <p>This document describes the "L" namespace and provides links to 
> related resources</p>
> 
> <!-- FIRST namespace -->
> <rddl:Namespace rdf:about="http://www.prescod.net/sometargetns#">
>     <rddl:title>My namespace</rddl:title>
>     <dc:author>Paul Prescod</dc:author>
>     <rddl:related>
>         <rddl:Resource rdf:ID="dtd" rddl:title="DTD">
>            <rddl:prose>A DTD for the L language.</rddl:prose>
>            <rddl:href rdf:resource="http://example.org/schemas/L.dtd"/>
>            <rddl:nature
> rdf:resource="http://www.isi.edu/in-notes/iana/assignments/media-types/applic
    ation/xml-dtd"/>
>            <rddl:purpose
>   rdf:resource="http://www.rddl.org/purposes#validation"/>
>         </rddl:Resource>
>     </rddl:related>
> 
>     <rddl:related>
>         <rddl:Resource rdf:ID="relaxng" rddl:title="Relax NG">
>             <rddl:prose>A Relax NG Schema for the L
>   language.</rddl:prose>
>            <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:Resource>
>      </rddl:related>
> 
>      <rddl:related>
>        <rddl:Resource rdf:ID="xhtml" rddl:title="User Documentation">
>             <rddl:prose>Reference documentation for L, in 
> XHTML.</rddl:prose>
>            <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:Resource>
>     </rddl:related>
> 
> </rddl:namespace>
> 
>   <!-- SECOND namespace -->
> 
> <rddl:namespace rdf:about="http:/.../second-namespace">
>     <rddl:related rdf:resource="#dtd"/>
>     <rddl:related rdf:resource="#relaxng"/>
>     <rddl:related>
>        <rddl:Resource rddl:title="User Documentation"> 
> <rddl:prose>Reference documentation for L2, in XHTML.</rddl:prose>
>            <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:Resource>
> </rddl:namespace>
>   </html>
> 
> Repeating rddl:related is kind of annoying (though your version did that 
> also). Why can't the RDF grammar just allow multiple descriptions per 
> property. Are we afraid that they would be interpreted as a formal 
> collection or something?

Because an RDF graph is made of triples made of three things
   resource node -> predicate arc ->  object node

not four - "multiple descriptions per property" as you ask:
   resource node -> predicate arc -> object node1 , object node2???

nothing to do with collections.

> Also, a purist might argue that the whole thing should be wrapped in 
> rdf:RDF, but I would say that rdf:about should be a sufficient RDF 
> processing trigger across all RDF embedded in other vocabularies.

A purist!?  Ha ha ha.

That's like asking an "XML purist" to allow an XML document with two
root elements; it just doesn't match the grammar and model.

RDF/XML defines when the root element must be rdf:RDF. See the spec
for details at http://www.w3.org/TR/rdf-syntax-grammar/#start


If you wanted to define a different language that mapped XML
elements, attribute and stuff to/from RDF triples, I've already said
I'm interested in that.  Especially where it has minimal or no impact
on the XML users.

> Add those to the list of things to fix in RDF/XML.

Like adding yet more alternative grammar forms to this?  That's a
crazy way to proceed, given your problems with where this is already.

Dave

Received on Tuesday, 12 November 2002 16:14:21 UTC