Re: Use of XSD number types is inconsistent with numbers in HTML

Am 17.01.13 11:36, schrieb Henri Sivonen:
> ITS 2.0 says things like: “An optional termConfidence attribute with
> the value of a rational number in the interval 0 to 1 (inclusive). The
> value follows the XML Schema decimal data type with the constraining
> facets minInclusive set to 0 and maxInclusive set to 1.”
>
> XSD number types allow leading and trailing whitespace. HTML-native
> number-valued attributes–such as those on <input type=range>–don’t.

Is that the only difference between the XSD numer type and the 
HTML-native number-valued attributes? So could we say

"The value follows the XML Schema decimal data type with the 
constraining facets minInclusive set to 0 and maxInclusive set to 1, but 
disallowing leading and trailing whitespace, in order to be consistent 
with the HTML number microsyntaxes 
http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#numbers"

Rationale: we are defining this and other data types both for HTML and 
XML. Currently the conversion between XML > HTML attributes using the 
data types the two follows a simple attribute re-naming algorithm, see 
step "2" below

http://www.w3.org/TR/2012/WD-its20-20121206/#html5-local-attributes
[

In HTML data categories are implemented as attributes. Name of HTML 
attribute is derived from the name of attribute defined in the local 
implementation by using the following rules:

 1.

    Attribute name is prefixed with |its-|

 2.

    Each uppercase letter in the attribute name is replaced by |-|
    (U+002D) followed by a lowercase variant of the letter.

Values of attributes which corresponds to data categories with a 
predefined set of values MUST 
<http://www.w3.org/TR/2012/WD-its20-20121206/#rfc2119> be matched 
case-insensitively.

]

We would like to keep that simplicity.

Best,

Felix
>
> For consistency with the rest of HTML, please use the HTML number microsyntaxes:
> http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#numbers
>

Received on Thursday, 17 January 2013 10:46:42 UTC