[closed] Re: datatypes-test001 incorrect

Daniel, thank-you for your comment.

On Fri, 7 Nov 2003, Daniel Krech wrote:

> I believe the positive test case datatypes-test001 is incorrect. One of
> the literal values differs between the input and output document in the
> language value. Which makes the literals (-> statements -> documents)
> not be equal.
>
> See:
>      http://www.w3.org/TR/rdf-concepts/#section-Literal-Equality
>
> The test case:
>
> http://www.w3.org/2000/10/rdf-tests/rdfcore/datatypes/
> Manifest.rdf#test001
>
> The input document:
>      http://www.w3.org/2000/10/rdf-tests/rdfcore/datatypes/test001.rdf
>
> The output document:
> http://www.w3.org/2000/10/rdf-tests/rdfcore/datatypes/test001.nt
>
>
> The statement that differs between the input and output document is:
>    subject: foo, predicate: baz, literal: 10 with lang tag of "fr"
> vs.
>    subject: foo, predicate:baz, literal: 10 without a lang tag

The test in question is correct. Although both an rdf:datatype and
xml:lang attribute can be present on a property element (in the latter
case, the xml:lang attribute may be "inherited" from a parent element),
if the rdf:datatype element is present then the literal value is a
datatyped one. Datatyped literals do not have a language component.

For details of this aspect of the syntax, see
http://www.w3.org/TR/rdf-syntax-grammar/#literalPropertyElt

The distinction between plain and typed literals is given here:
http://www.w3.org/TR/rdf-concepts/#section-Literals

In fact, this is exactly the question this test case attempts to
illustrate.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/

Received on Thursday, 13 November 2003 09:20:02 UTC