Re: The value space of XMLLiteral (was: Re: XML literals poll)

On 24 Nov 2011, at 14:46, Ivan Herman wrote:
>> Saying “the values are XML infosets; you figure out yourself how to compare them” doesn't seem sufficient.
> Why? I mean, we do not have to go into some sort of a great detail here. The infoset standard says that 
> [[[
> An XML document has an information set if it is well-formed and satisfies the namespace constraints described [BELOW]
> ...
> An XML document's information set consists of a number of information items...
> ]]]
> And what we say is that, as far as we are concerned, two values are identical if their information set are identical. I just do not see why we would have to go beyond that.

Yes, that might well be sufficient, but that's different from “keeping silent about comparison” as you suggested.

>> The spec also says that you “SHOULD specify a canonical mapping for the datatype if practicable”, which means even if the value space is infosets, the spec SHOULD still say, “the canonical mapping is XC14N”.
> Well, it is a SHOULD. In this case, there may not be one such approach. Users MAY use canonicalization; MAY convert their XML into a DOM 2 representation and compare the nodes programatically; etc. Again, I am not sure we have to go into too much details

What I proposed is to say, literally, “The canonical mapping is the mapping defined in [XML-XC14N].” (Note, the “canonical mapping” is the thing that flags one lexical form for each value as the “canonical representation”. Like the thing that says that "1"^^xsd:integer is canonical while "+01"^^xsd:integer isn't. Implementers don't have to do anything about canonical mappings.)


Received on Thursday, 24 November 2011 14:55:00 UTC