W3C home > Mailing lists > Public > w3c-rdfcore-wg@w3.org > April 2003

xmlsch-02 whitespace facet discussion

From: Jeremy Carroll <jjc@hpl.hp.com>
Date: Mon, 14 Apr 2003 21:40:58 +0300
To: w3c-rdfcore-wg@w3.org
Message-Id: <200304142140.58012.jjc@hpl.hp.com>


This issue is ...
[[
Some members of the XML Schema WG have expressed concern that XML
    Schema's rules for whitespace handling may interfere with expected
    behavior in other contexts. This may be the appropriate place to bring
    this question up.
]]
etc

see
http://lists.w3.org/Archives/Public/www-rdf-comments/2003JanMar/0489.html
part 1.2

My understanding is that RDF datatyping does *not* use XML Schema rules for 
whitespace processing (since they are not part of the lexical2value mapping 
as expressed in XSD).

examples:

<rdf:Description>
  <eg:p1 rdf:datatype="&xsd;int">    1    </eg:p1>
  <eg:p2 rdf:datatype="&xsd;int">1</eg:p2>
</rdf:Description>

Descibes a resource with two properties eg:p2 has an integer value (1), 
whereas eg:p1 does not have but is an ill-formed typed literal.

It seems to me that the whitespace handling of RDF is often misunderstood, 
e.g. today I was passed an example by a co-author which incorrectly expected 
whitespace trimming of values.


I think we could go in either of two directions:

A: accept the comment
"worried that it may not be
    obvious that the whitespace processing is not part of the process of
    checking lexical forms for type validity," and add test cases to 
demonstrate that whitespace is significant even inside typed literals of 
types which in a XML Schema context would get processed away (such as the 
integer examples)


B: accept the comment, amd moreover we think it will be less confusing to 
follow the XML Schema whitespace facet and the RDF L2V mapping is the mapping 
of:
   1) apply the relevant whitepsace processing rules according to the 
whitespace facet
  2) apply the XSD L2V mapping
with corresponding changes to the lexical space.

This would change the eg:p1 eg:p2 example (above) so that both properties had 
the same value.

thoughts?

Jeremy
Received on Monday, 14 April 2003 15:40:40 EDT

This archive was generated by hypermail pre-2.1.9 : Wednesday, 3 September 2003 09:56:56 EDT