Re: RDF in XHTML

Dave Beckett wrote:
 > I really don't think an RDF/XML specification (or any other) should
 > say anything about other formats work, that is for them to define.
 > They could have a wrapper element that says
 >   <refutes>     ... big chunk of RDF/XML ...
 >   </refutes>
 > or something, that is not for RDF/XML to interpret.

I could argue that they should use an encoding strategy to accomplish this.

The "depend on context" strategy is consistent and has the advantage 
that it is very easy to invent a syntax that does this sort of 
refutation. But it has the cost that it is impossible to build a 
generalized RDF harvester ("SemGoogle") that can ignore the different 
presentation-oriented markup languages that RDF will be embedded in. An 
alternate, also consistent strategy would be to say RDF means what it 
means and people who don't want it to be interpreted should escape it 
somehow. This would make the implementation of SemGoogle easier at a 
cost of requiring RDF-namespace-using stuff to be really RDF.

XSLT has a mechanism designed to allow this escaping, called 
namespace-alias:

"NOTE: It may be necessary also to use aliases for namespaces other than 
the XSLT namespace URI. For example, literal result elements belonging 
to a namespace dealing with digital signatures might cause XSLT 
stylesheets to be mishandled by general-purpose security software; using 
an alias for the namespace would avoid the possibility of such mishandling."

As a practical matter, any other  language that wants to prevent the 
interpretation of embedded RDF could and should do the same (if only as 
a defense against poorly designed spiders). And then there are the 
escaping mechanisms built into XML.

>... 
> In SVG you use <metadata> element for embedding RDF - see the example
> in the specification - and then inside that you use <rdf:RDF> if that
> is the metadata format you want. 

 >...
> 
> However, the RDF/XML syntax specification does specify how to process
> RDF/XML inside another XML format for when it is intended to be
> processed as embedded RDF/XML.  You can find it at:
> 
>   7.2.1 Grammar start
>   http://www.w3.org/TR/rdf-syntax-grammar/#start
> 
> It is all a question of context that is defined outside this
> specification, external knowledge that the content it is rdf/xml (*)
> - the containing format or protocol tells you this or some
> other method.  If this is the case, you can omit rdf:RDF and the
> embedding format can start the RDF/XML parser at the right
> production. 

What I hear you saying is that the RDDL media type (and potentially 
others, like SVG and XHTML) can start the RDF/XML grammar at the 
nodeElement production. That is essentially what I was asking for:

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

RDDL CAN skip the rdf:RDF and still match the grammar. You just match a 
different production in the grammar. And RDDL can (and should!) choose 
to interpret that production according to the rules of the RDF 
specifications.

  Paul Prescod

Received on Wednesday, 13 November 2002 19:59:57 UTC