Re: declaredAs

On Aug 9, 2007, at 10:09 PM, John McClure wrote:

>
> I'm wondering then about the consistency of the semantics,
> If:
>> 	<rdf:Description rdf:about="#foo"/>
>> and
>> 	<rdf:Description rdf:ID="foo"/>
>> Produce exactly the same node.
>
> Then what is the semantic for:
> 	<rdf:Description rdf:ID='x' rdf:about="#foo"/>
> ?

Syntax error.

Instead of relying on your intuition, which, for RDF/XML, trust me,  
isn't remotely reliable (for *any*one), I recommend section 2 of the  
spec:
	http://www.w3.org/TR/rdf-syntax-grammar/#section-Syntax

Which is a very nice, example driven but exhaustive, tour of RDF/XML  
syntax.

The W3C RDF validator is a great, zero install tool for seeing what  
bits of RDF/XML parse to:
	http://www.w3.org/RDF/Validator/

When in doubt, test.

I popped your node into the example in the validator:

<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dc="http://purl.org/dc/elements/1.1/">
   <rdf:Description rdf:about="http://www.w3.org/">
     <dc:title><rdf:Description rdf:ID='x' rdf:about="#foo"/></dc:title>
   </rdf:Description>
</rdf:RDF>

The error message is clear:
	Error: {E201} Both ID and about[Line = 5, Column = 61]


> Discussion
> ==========
[snip...I'm sorry, but this exhibits a huge number of confusions that  
I don't have time to sort out right now]

> Chiefly for reason of this proof, I am surprised that you think  
> these two
> properties (ID & about)

They aren't properties. At least not rdf:Properties. They are part of  
the *syntax* not the model.

> represent "syntactic sugar"

ID is (crappy) syntactic sugar for about.

> because then you're saying
> that they are sameAs one another

No I'm not.

> -- and why in the world would the spec have
> these two properties

None of the RDF specs have these as properties. Look around. There is  
no assertion that either are properties.

I  know Sandro would like them to be, but that's different :)

> in the first place, and not indicate that they are
> syntactic sugar?

It does, both normatively and informatively. I point you to the  
informative:
	http://www.w3.org/TR/rdf-syntax-grammar/#section-Syntax-ID-xml-base

"""RDF/XML allows further abbreviating RDF URI references in XML  
attributes in two ways.
...
The rdf:ID attribute on a node element (not property element, that  
has another meaning) can be used instead of rdf:about and gives a  
relative RDF URI reference equivalent to # concatenated with the  
rdf:ID attribute value. So for example if rdf:ID="name", that would  
be equivalent to rdf:about="#name". rdf:ID provides an additional  
check since the same name can only appear once in the scope of an  
xml:base value (or document, if none is given), so is useful for  
defining a set of distinct, related terms relative to the same RDF  
URI reference."""

I agree that the last sentence is misleading and there are only a  
very limited number of cases where it can be made to work and  
requires otherwise restricting the syntax. And has no effect on the  
model. For example, if you require your author to give every uri a  
label and only one label, then you could force them to write label  
assertions *only* this way:

<rdf:Description rdf:ID="foo">
	<rdfs:label>foo</rdfs:label>
</rdf:Description>

And the *parser* will complain if you repeat this fragment (in the  
scope of the same base). But note it won't hiccup at all if you do:
<rdf:Description rdf:ID="foo">
	<rdfs:label>foo</rdfs:label>
	<rdfs:label>bar</rdfs:label>
</rdf:Description>

Or
<rdf:Description rdf:ID="foo">
	<rdfs:label>foo</rdfs:label>
</rdf:Description>
<rdf:Description rdf:about="#foo">
	<rdfs:label>bar</rdfs:label>
</rdf:Description>

And if you write Turtle, you don't have that check *expressible* in  
the syntax. (Actually, every alternative serialization that I'm  
familiar with lacks anything like rdf:ID. Even if they had it,  
there'd be no way to round trip it.)

So it really has nothing at all to do with declaring, or making  
something a *definition*.

It's just sugar. You lose nothing by eschewing it and gain some  
simplicity and clarity.

> My thinking is that, to the contrary, a given document may
> have only one declaration for a thing, but can have as many  
> assertions about it
> as they care to have, so it's important to have both properties.

In OWL 1.1 things can have many declarations per term. I don't know  
why only one is valuable. But rdf:ID doesn't get you *any sort of  
declaration*. It's *just a funny way of making an assertion*.

> Am I way-off the deep end here?

Yep. But understandably. But *way* :) Let it go.

> Thanks in advance.

Your welcome. Hope it helps.

Cheers,
Bijan.

Received on Thursday, 9 August 2007 21:49:36 UTC