Re: Reifying using XML attributes only

Dave Beckett wrote:
> 
> Addressing ACTION: 2001-08-24#8 Dave Beckett
>   Write up a proposed resolution for reifying using XML attributes
>   anly (sic)
> 
> The RDF XML syntax defined in M&S allows properties to be written as
> XML attributes in the Qname form, with values that are strings.
> These are then turned into RDF statements with a string object.  The
> syntax also allows the rdf:type property to be used as an attribute
> with the string value interpreted as a URI-reference.
> 
> M&S defines explicitly other properties including rdf:subject,
> rdf:predicate and rdf:object
>   http://www.w3.org/TR/REC-rdf-syntax/#formalReification
> 
> In summary, these take as values:
>   Property      Property Value
>   --------      --------------
>   rdf:type      URI-reference
>   rdf:subject   URI-reference
>   rdf:predicate URI-reference
>   rdf:object    URI-reference or literal

Umm... I'm running into the same sort of use/mention issues
here as are all over the RDF 1.0 spec.

The fact that both XML attributes and RDF properties have
values is one source of confusion.

The values/objects of statements whose predicate is rdf:type are
not constrained at all, as far as I know, let alone
being constrained to a URI-reference.

i.e. it's not the case that

	rdf:type rdfs:range xmlschema-datatype:URI-reference.

right?

But no matter... the test case you give is clear enough...

> These can be used in this attribute abbreviated form since they match
> the grammar propAttr or typeAttr (for rdf:type).
> 
> Testing the attached example with parser implementations gives
> different results for the statement values - some literals,
> some URI-references.
> 
> Thus, we need to clarify what is allowed here.
> 
> Proposed clarification / resolution, test case.
> 
>   For properties encoded in XML attribute form, the attribute value
>   is interpreted as a literal for all properties except rdf:type
>   for which it is interpreted as a URI-reference.

I'm not a big fan of this exception. While we're cleaning up
this mess, I suggest we get rid of it.


>   The attached N-Triples defines the model produced by the attached
>   RDF/XML.
> 
> Consequences:
>   rdf:subject and rdf:predicate if used in XML attribute form will
>   generate literal values which are presently forbidden (I think!)

I think not. They might not make much sense, but they're not forbidden.

>   or maybe just very unexpected.

quite possibly.

>   If you want to use rdf:subject, rdf:predicate properties, encode
>   them in the property element form (propElt).

Yup. rdf:type too, I suggest.

>   rdf:object can be used but can only take a literal value.




I suggest the expected results are:

_:id1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
"http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement" .
_:id1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject>
"http://example.com/resource" .
_:id1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate>
"http://example.com/predicate" .
_:id1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> "literal" .


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

Received on Thursday, 30 August 2001 14:14:29 UTC