W3C home > Mailing lists > Public > public-rdf-wg@w3.org > January 2012

Re: behavior of turtle vs. HexBinary literals

From: Andy Seaborne <andy.seaborne@epimorphics.com>
Date: Sun, 22 Jan 2012 16:21:49 +0000
Message-ID: <4F1C379D.3050906@epimorphics.com>
To: public-rdf-wg@w3.org

On 22/01/12 15:49, Gavin Carothers wrote:
> On Sun, Jan 22, 2012 at 7:41 AM, Ivan Herman<ivan@w3.org>  wrote:
>> As part of the possible cleanup actions...
>> There has been some discussions on the semantic-web mailing list, started by a question of Henry Story[1], on what is exactly the required behaviour of, say, turtle, with xsd:hexBinary literals. I wonder whether there is anything that the RDF WG has to say about it in a cleaned-up version of the specs...
> It appears that Henry is trying to do lexical comparison without
> comparing the Canonical Representation. I don't think Turtle, RDF/XML,
> or any RDF machinery is really involved here. It seems to be a pure
> datatype question. A value space comparison will produce the correct
> results every time. If the Canonical Representation was used in Turtle
> then the two lexical values would be identical as well.

Having been following the thread and read the related XML schema WG 
thread, I think that Henry is also concerned with the "readability" of 
xsd:hexBinary.  He'd like completely ignored internal whitespace so you 
can write:

:s :p """1234 5678
9abc def0
1234 5678
9abc def0"""^^xsd:hexBinary .

which is not a legal hexBinary lexical form (unlike base64, it does not 
allow internal whitespace).  XML schema WG agree it should have been 
like that but it isn't.  There is an argument of wanting to finish their 
spec i.e. leave it as is.

I have sympathy for Henry's argument.  You can't pull the suggested 
(RDF/)XML trick in Turtle (use XML comments to bracket a newline).


At the same time, I'm not keen on Turtle acquiring a special feature 
(e.g. a literal that does whitespace processing or a syntax for breaking 
up strings into chunks) just for this corner case.

Defining a special (different) datatype is possible but then general XSD 
evaluators don't handle it.

Every way is ugly but in the end it's a feature of XSD hexBinary and we 
are better living with it.  The value of a special Turtle feature (and 
N-triples?) has, for me, to be much higher than it is.


> --Gavin
>> Ivan
>> [1] http://lists.w3.org/Archives/Public/semantic-web/2012Jan/0082.html
>> ----
>> Ivan Herman, W3C Semantic Web Activity Lead
>> Home: http://www.w3.org/People/Ivan/
>> mobile: +31-641044153
>> FOAF: http://www.ivan-herman.net/foaf.rdf
Received on Sunday, 22 January 2012 16:22:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:04:11 UTC