<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Lars Heuer wrote:
<blockquote cite="mid:1910691306.20090330202715@semagia.com" type="cite">
<pre wrap="">Hi Xuân,
It would be very nice if you take a minute to read
<a class="moz-txt-link-rfc2396E" href="http://learn.to/quote"><http://learn.to/quote></a> (and follow these rules of course). TIA.
[...]
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">Requiring that the string which was provided by the user is kept,
would be wrong imo.
</pre>
</blockquote>
<pre wrap="">Well, why?
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
<blockquote type="cite">
<pre wrap="">We can make it very simple:
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
<blockquote type="cite">
<pre wrap=""> An attempt to set the datatype only succeeds either if the old
datatype is xsd:string or if the old datatype equals the new
datatype, otherwise such an attempt is an error.
</pre>
</blockquote>
<pre wrap=""><!---->
Yes, actually I thought about limiting the datatype to xsd:string
until Lars Marius brought up his examples. :) We could limit the
'input' datatype to xsd:string, of course, but I thought it would be
neither fish nor fowl, just one more special case.
</pre>
</blockquote>
Well, like the star * becoming a literal... ;-)<br>
<blockquote cite="mid:1910691306.20090330202715@semagia.com" type="cite">
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap="">The purpose of overriding datatypes is to make it possible to write
typed strings as template-arguments without providing the type
information over and over again.
</pre>
</blockquote>
<pre wrap=""><!---->
Yep, but I think limiting the stuff to xsd:string and creating a
special case would be wrong (maybe rho influenced me more than I
thought ;)). What's special about strings? Because everything has a
string representation? If everything has a string representation, why
shouldn't we allow the examples Lars Marius has brought up? All XML
Schema datatypes have at least one string representation.</pre>
</blockquote>
This is special about string. The syntactic value space of string
encompasses all syntactic value spaces. This is not true for other
datatypes.<br>
<blockquote cite="mid:1910691306.20090330202715@semagia.com" type="cite">
<pre wrap="">And if we
limit the datatype to xsd:string, what about our escaping rules, do we
need an additional "raw" string literal or do we assume that the other
datatype can happily use our de-escaped strings?
</pre>
</blockquote>
The latter. We always assume, and do not verify, that whatever is
stored in a value of an occurrence matches the datatype which is stored
in the same occurrence. Ensuring that it indeed does match is out of
the scope of TMDM and CTM.<br>
<br>
We've hat the discussion in Prague whether we would have escape-less
strings (which was said to be useful for regular expressions, for
example). The decision was, for the time being, to not have a second
string literal syntax. My person opinion is currently: I do not care
whether we have a raw string syntax, but if we have one, such a raw
string literal should be started with a single quotes (or, if we want
to be really "correct" and avoid premature termination of such a raw
string literal, the delimiters of such a raw string literal should be
related pairs, such as «double angle quotes» (reachable by AltGr+Y and
AltGr+X on my keyboard ;-))). Other suggested delimiters were slashes
(e.g. /this is a string for regular expressions/), which I think are
too specialized.<br>
<blockquote cite="mid:1910691306.20090330202715@semagia.com" type="cite">
<pre wrap="">
Best regards,
Lars
</pre>
</blockquote>
ciao,<br>
Xuân.<br>
<br>
</body>
</html>