W3C home > Mailing lists > Public > w3c-rdfcore-wg@w3.org > February 2002

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

From: Dave Beckett <dave.beckett@bristol.ac.uk>
Date: Fri, 15 Feb 2002 10:46:24 +0000
To: Patrick Stickler <patrick.stickler@nokia.com>
cc: RDF Core <w3c-rdfcore-wg@w3.org>
Message-ID: <20838.1013769984@tatooine.ilrt.bris.ac.uk>
>>>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?

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

which is shorthand for

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

which is shorthand for
        <rdf:dtype>&xsd;date</rdf:dtype>  <!-- see below -->

>    <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:
        <rdf:dtype rdf:resource="&xsd;date"/>

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

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:24:10 UTC