W3C home > Mailing lists > Public > public-rdf-wg@w3.org > November 2011

Re: XML literals poll

From: Antoine Zimmermann <antoine.zimmermann@emse.fr>
Date: Wed, 23 Nov 2011 10:06:13 +0100
Message-ID: <4ECCB785.1040706@emse.fr>
To: public-rdf-wg@w3.org
My votes.

Le 21/11/2011 20:32, Richard Cyganiak a écrit :
> Below are six questions on XML literals. Please help the WG get a
> feeling for the general opinion within the group by answering the
> questions. Answers in the usual +1/±0/-1 style are appropriate.
> Thanks, Richard
> Q1. Should the specs define a way to compare XML literals based on
> value?
> In other words, in the same way that integers 7 and 007 have the same
> value, should<foo/>  and<foo></foo>  be defined as having the same
> value?

Yes, as long as it is optional, just like "7"^^xsd:integer and
"007"^^xsd:integer have the same value only in D-entailment.

> Q2. Should the specs say that RDF implementations MUST support
> value-based comparison?
> In other words, assuming the specs define a value space that answers
> Q1 in the affirmative, is it required that all RDF toolkits implement
> some sort of canonicalization somewhere in the process?

No, just like they don't have to canonicalise integers etc.

> Q3. Should the *lexical* space be in canonical form?
> In other words, should <>  ex:value "<foo/>"^^rdf:XMLLiteral. <>
> ex:value "<foo></foo>"^^rdf:XMLLiteral.
> result in a graph with one triple (canonicalize) or two (don't
> canonicalize)? Note that if you answer “two”, then it is unavoidable
> that round-tripping an XML literal, or storing the same XML literal
> in two different formats (say, RDF/XML and Turtle) and reading it
> again, will sometimes result in a different triple (with the same
> value though).

Definitely not. This is the wierdest condition in RDF 2004, IMO.

> Q4. Should *invalid XML* be allowed in the lexical space?
> In other words, should "</bar !!!>"^^rdf:XMLLiteral be ill-typed
> (just like "AAA"^^xsd:integer) or well-typed (just like"</bar
> !!!>"^^xsd:string)?

Allowed? I think invalid XML should not *be* in the lexical space. 
Again, this matters only to systems which have XMLLiteral in their 
datatype map, which we can make optional for RDF 1.1.

> Q5. Should the specs say that RDF/XML parsers MUST canonicalize when
> handling parseType="literal"?
> RDF/XML parsers are often implemented on top of an XML parser, and
> hence they don't have access to a low-level representation of the XML
> literal, e.g., did it use single or double quotes in the attributes,
> what order where the attributes in, or how many spaces were between
> them? If they don't canonicalize, then two different RDF/XML parsers
> would be pretty much guaranteed to parse the same RDF/XML file into
> different triples (or even different runs of the same parser over the
> same file could yield different triples).

If XMLLiteral is optional that should be No.

> Q6. Should it be required that producers of XML literals in concrete
> syntaxes (Turtle, N-Triples, other parseTypes in RDF/XML)
> canonicalize the literals themselves?
> If the lexical space is canonicalized (see Q3), then it means that
> canonicalization either has to be done by parsers (see Q5), or by
> content producers.

No one should have to canonicalise.

Antoine Zimmermann
ISCOD / LSTI - Institut Henri Fayol
École Nationale Supérieure des Mines de Saint-Étienne
158 cours Fauriel
42023 Saint-Étienne Cedex 2
Tél:+33(0)4 77 42 66 03
Fax:+33(0)4 77 42 66 66
Received on Wednesday, 23 November 2011 09:06:51 UTC

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