incubator-clerezza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henry Story (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CLEREZZA-595) StringLiteral and PlainLiteral semantics are wrong
Date Thu, 07 Jul 2011 06:05:16 GMT

     [ https://issues.apache.org/jira/browse/CLEREZZA-595?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Henry Story updated CLEREZZA-595:
---------------------------------

    Description: 
The "Datatype Entailment Rules" in the RDF Semantics spec (section 7.4) make it very clear
that in rules xsd 1a and xsd 1b that the "a string"^^xsd:string is semantically equivalent
to "a string".
The following two transformations rules are made explicit there

<quote href="http://www.w3.org/TR/rdf-mt/">
xsd 1a:	uuu aaa "sss".      	             -->     uuu aaa "sss"^^xsd:string .
xsd 1b:	uuu aaa "sss"^^xsd:string .	     -->     uuu aaa "sss".
</quote>

But if one creates a plain literal in Scala without a language tag one does not get the equality
as expected with the xsd:TypedLiteral equivalent.
The following test will confirm this.

	@Test public void plainLiteralStringEquality() {
		String string = "a string is a sequence of characters";
		UriRef xsdstring = new UriRef("http://www.w3.org/2001/XMLSchema#string");
		PlainLiteral plainStringLiteral = new PlainLiteralImpl(string);
		TypedLiteral typedStringLiteral = new TypedLiteralImpl(string, xsdstring );
		Assert.assertEquals("an xsd:string is the same as the string itself, so it must be the same
as the plain literal",
				plainStringLiteral,typedStringLiteral);
	}

  was:
The "Datatype Entailment Rules" in the RDF Semantics spec make it very clear that in rules
xsd 1a and xsd 1b that the "a string"^^xsd:string is semantically equivalent to "a string"

<quote>
xsd 1a	uuu aaa "sss".      	              uuu aaa "sss"^^xsd:string .
xsd 1b	uuu aaa "sss"^^xsd:string .	      uuu aaa "sss".
</quote>

But if one creates a plain literal in Scala without a language tag one does not get the equality
as expected with the xsd:TypedLiteral equivalent.
The following test will confirm this.

	@Test public void plainLiteralStringEquality() {
		String string = "a string is a sequence of characters";
		UriRef xsdstring = new UriRef("http://www.w3.org/2001/XMLSchema#string");
		PlainLiteral plainStringLiteral = new PlainLiteralImpl(string);
		TypedLiteral typedStringLiteral = new TypedLiteralImpl(string, xsdstring );
		Assert.assertEquals("an xsd:string is the same as the string itself, so it must be the same
as the plain literal",
				plainStringLiteral,typedStringLiteral);
	}


> StringLiteral and PlainLiteral semantics are wrong
> --------------------------------------------------
>
>                 Key: CLEREZZA-595
>                 URL: https://issues.apache.org/jira/browse/CLEREZZA-595
>             Project: Clerezza
>          Issue Type: Bug
>            Reporter: Henry Story
>
> The "Datatype Entailment Rules" in the RDF Semantics spec (section 7.4) make it very
clear that in rules xsd 1a and xsd 1b that the "a string"^^xsd:string is semantically equivalent
to "a string".
> The following two transformations rules are made explicit there
> <quote href="http://www.w3.org/TR/rdf-mt/">
> xsd 1a:	uuu aaa "sss".      	             -->     uuu aaa "sss"^^xsd:string .
> xsd 1b:	uuu aaa "sss"^^xsd:string .	     -->     uuu aaa "sss".
> </quote>
> But if one creates a plain literal in Scala without a language tag one does not get the
equality as expected with the xsd:TypedLiteral equivalent.
> The following test will confirm this.
> 	@Test public void plainLiteralStringEquality() {
> 		String string = "a string is a sequence of characters";
> 		UriRef xsdstring = new UriRef("http://www.w3.org/2001/XMLSchema#string");
> 		PlainLiteral plainStringLiteral = new PlainLiteralImpl(string);
> 		TypedLiteral typedStringLiteral = new TypedLiteralImpl(string, xsdstring );
> 		Assert.assertEquals("an xsd:string is the same as the string itself, so it must be
the same as the plain literal",
> 				plainStringLiteral,typedStringLiteral);
> 	}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message