Re: Parser mods to support rdf:dtype and rdf:lform

>>>Patrick Stickler said:
> 
> I just thought I'd try to summarize what I saw as the necessary
> parser extensions required to support the datatyping idioms,
> which would be necessary to always achieve the correct idiom
> from the intuitive serializations mirroring rdf:value usage.
> 
> (of course, these aren't manditory, but I think reasonable and
>  surely beneficial to users)
> 
> At present, given any of the following, all parsers (almost)
> do "the right thing" and result in the required bNode idiom:

Do the right thing with respect to Pat's datatypes V3 doc?
  http://www.coginst.uwf.edu/users/phayes/DatatypeSummary3.html


1)
>    <dc:date rdf:value="2002-02-14"/>

which is shorthand for
     <dc:date>
      <rdf:Description>
        <rdf:value>2002-02-14</rdf:value>
      </rdf:Description>
     </dc:date>

2)
>    <dc:date rdf:value="2002-02-14" rdf:dtype="&xsd;date"/>

which is shorthand for
     <dc:date>
      <rdf:Description>
        <rdf:value>2002-02-14</rdf:value>
        <rdf:dtype>&xsd;date</rdf:dtype>  <!-- see below -->
      </rdf:Description>
     </dc:date>

3)
>    <dc:date rdf:parseType="Resource">
>      <rdf:value>2002-02-14</rdf:value>
>      <rdf:dtype rdf:resource="&xsd;date"/>
>    </dc:date>

which is shorthand for the same thing as 2) except the rdf:dtype
value is an URI:
     <dc:date>
      <rdf:Description>
        <rdf:value>2002-02-14</rdf:value>
        <rdf:dtype rdf:resource="&xsd;date"/>
      </rdf:Description>
     </dc:date>

4)
>    <dc:date>
>      <rdf:Description>
>        <rdf:value>2002-02-14</rdf:value>
>        <rdf:dtype rdf:resource="&xsd;date"/>
>      </rdf:Description>
>    </dc:date>

Which is the longhand, same as 3)


> (I'm leaving the datatype idiom out of this, since it
> can't be treated in any generic fashion by the parser)
> 
> Where parsers don't do the right thing, is in the second
> example with the rdf:dtype attribute, which results in
> the xsd:date URI being a literal rather than a resource,
> so parsers would have to be updated to recognize rdf:dtype
> and give it special interpretation as being similar to
> rdf:resource.

No, it is similar to rdf:type - the only property that when used as
an attribute always is a URI(ref).  rdf:resource is a syntax
mechanism, rdf:type & rdf:dtype is/will are RDF properties.


> If we use rdf:lform rather than rdf:value, then we would
> have to also give rdf:lform the same treatment as rdf:value
> now recieves.

lform?  I've missed that.  However, rdf:value has no special syntax
support, it is just a property like any other.

> I think that's all that would be required, and it seems
> to be pretty straightforward, even trivial.
> 
> Comments from the parser implementors?

Trivial, yes.  Unsure if anything is needed for rdf:lform

Dave

Received on Friday, 15 February 2002 05:46:26 UTC