[whatwg] Duplicate Entity Reference Listed in Table of Entities

2008-04-25 Thread Lachlan Hunt

Hi,
  The spec currently lists the entity not; twice in the table of 
entities, as shown in this extract:


...
nopf;  U+1D55F
not;   U+000AC
notU+000AC
notin; U+02209
...

--
Lachlan Hunt - Opera Software
http://lachy.id.au/
http://www.opera.com/


Re: [whatwg] Duplicate Entity Reference Listed in Table of Entities

2008-04-25 Thread David Håsäther
Sorry Lachlan, you'll get this twice. Forgot the list.

Lachlan Hunt wrote:
 Hi,
   The spec currently lists the entity not; twice in the table of entities,
 as shown in this extract:

  ...
  nopf;  U+1D55F
  not;   U+000AC
  notU+000AC
  notin; U+02209
  ...

I think this is done one purpose, for entity references that are
recognized by browsers without the closing ;. The same thing is done
for e.g. AMP and AMP;, and Agrave; and Agrave.

-- 
David Håsäther


Re: [whatwg] Expanding datetime

2008-04-25 Thread Ernest Cline
-Original Message-
From: Henri Sivonen [EMAIL PROTECTED]



The historic astronomy case seems awfully narrow to justify making  
native date widgets deal with BCE dates.

Native date widgets already need to deal with BCE dates at the DOM level as they
are well within the range of a DOMTimeStamp.  In ECMAScript the range of years 
for
which any time in the year can be represented is from 283,459 BCE to 287,398 AD.
What is being proposed is allowing a document to specify such times in the 
document
without having to resort to scripting by expanding the range of values the 
datetime
attribute can represent.

The draft is already proposing making changes to the existing HTML 4 
specification
of datetime by allowing only the date or the time to be given instead of the 
full
date and time, so datetime is already being proposed to be changed, so the 
question
therefore is not should we change datetime, but rather what other changes would 
be worth incorporating so as to avoid having to change datetime a second time.  
(For instance, since DOMTimeStamp uses a millisecond granularity, allowing 
datetime
to specify milliseconds may be of use as well.)


Re: [whatwg] Expanding datetime

2008-04-25 Thread WeBMartians
We're in a situation, here, where the HTML specification is about to say You 
can specify a value, but, maybe, just maybe, you cannot show that value ... 
Oh, yes, AND we're not even going to tell you when that 'maybe' is in effect!

If you can spec a value, you should be able to present it. Imagine setting a 
Javascript integer to -123456789 but not being able to toString() it. Imagine 
setting a  background-color: Red; but not having it show (or show as a 
different color). Imagine the howling and complaining about that!

The generation of the proper datetime string is easy, technically. Yes, Apple, 
Microsoft, Mozilla and Opera will have to ensure that the values can be 
generated, if such test cases do not exist already.

The datetime string to value conversion is going to cause some more effort.

Can the standard state that datetime strings support ISO 8601:2004 and leave it 
at that? (just a thought)

At the very least, have a MINDate MAXDate (a la the C limits.h) constant.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ernest Cline
Sent: Friday, 2008 April 25 13:09
To: Henri Sivonen; Charles McCathieNevile
Cc: WHATWG List
Subject: Re: [whatwg] Expanding datetime

-Original Message-
From: Henri Sivonen [EMAIL PROTECTED]



The historic astronomy case seems awfully narrow to justify making 
native date widgets deal with BCE dates.

Native date widgets already need to deal with BCE dates at the DOM level as 
they are well within the range of a DOMTimeStamp.  In ECMAScript the range of 
years for which any time in the year can be represented is from 283,459 BCE to 
287,398 AD.
What is being proposed is allowing a document to specify such times in the 
document without having to resort to scripting by expanding the range of values 
the datetime attribute can represent.

The draft is already proposing making changes to the existing HTML 4 
specification of datetime by allowing only the date or the time to be given 
instead of the full date and time, so datetime is already being proposed to be 
changed, so the question therefore is not should we change datetime, but rather 
what other changes would be worth incorporating so as to avoid having to change 
datetime a second time.  
(For instance, since DOMTimeStamp uses a millisecond granularity, allowing 
datetime to specify milliseconds may be of use as well.)



Re: [whatwg] Expanding datetime

2008-04-25 Thread Ernest Cline


-Original Message-
From: WeBMartians [EMAIL PROTECTED]

Can the standard state that datetime strings support ISO 8601:2004 and leave 
it at that? (just a thought)

Considering the considerable number of formats that ISO 8601:2004 encompasses, 
I don't think that would be a good idea.  The following format possibilities 
for specifying instants in time, while acceptable to ISO 8601:2004 would not be 
worth adding to HTML 5 under any use case I can imagine.

I really can't see why they bothered with the century format except as 
supplemental field for pre Y2J applications that used a 2 digit year field.

Decimal minutes and hours are allowed in ISO 8601:2004, but lead to problems 
with rounding once one gets to increments smaller than 0.0001 min and 0.1 h 
respectively, so should probably not be adopted.

The alternate ways of representing 1985-04-12: the ordinal date (1985-102) and 
the week date (1985-W15-5) don't offer anything that would justify the extra 
complexity that would be required of the parser.

In case the specification ever develops a use case for a comma separated list 
of datetime values, then the use of comma as an alternate to the period for the 
decimal point should not be allowed.

HTML 4 currently allows only:
-##-##T##:##:##Z
-##-##T##:##:##+##:##
-##-##T##:##:##-##:##

These three formats are a subset of those suggested by the W3C datetime note 
[1] which itself is a subset of the choices available under ISO 8601.

The HTML 5 draft currently extends this to allow:
 * leaving out the seconds (valid under the W3C datetime note)
 * adding a decimal point and one or more digits for fractional seconds (valid 
under the W3C datetime note)
 * specifying just the date (valid under the W3C datetime note)
 * specifying just the time (valid under ISO 8601, but not the W3C datetime 
note)
 * replacing the T separator between the time and date with whitespace (NOT 
VALID under ISO 8601)
 * including some optional whitespace in some specific places (NOT VALID under 
ISO 8601)

Unless allowing the whitespace is needed to back standardize an existing 
implementation's handling of ins/del, it should be removed from the draft 
as it is not ISO 8601 compliant and complicates the job of the parser, though I 
grant it does improve the human readability slightly.

As a side issue, unless attribute values are restricted to ISO/IEC 656 
characters, ISO 8601 appears to call for also accepting U+2010 HYPHEN as a 
separator between the fields of a date value, and U+2212 MINUS for the sign in 
a time zone designator or extended year representation.

The following is a list of steps for a parser that accepts a wide range of 
valid ISO 8601 datetime formats, assuming that extended years are of the format 
±Y and that at most 3 digits are allowed after the FULL STOP in the 
seconds.  Variables date, time, and zone are booleans for whether a date, 
time, or timezone was present in the designation.  Variables year, month, 
day, hour, minute, second, millisecond, zonehour, and zoneminute 
contain the correct results, but range checking for nonsense values as 
2007-02-29 or even 2007-13-42 is not done, nor is converting them to value 
stored in the DOM.

0. Set month and day to 1; set hour, minute, second, and 
millisecond to 0; set date, time, and timezone to invalid; advance to 
the first non-whitespace character.
1. If the next character is not PLUS, MINUS, or HYPHEN-MINUS, skip to step 5.
2. If the next character is not PLUS, set year to -1, else set year to 1.
3. Advance 1 character; if the next five characters are not in the set DIGIT 
ZERO .. DIGIT NINE, abort as invalid.
4. Set date to valid; multiply year by the value given by the next five 
characters; advance 5 characters; skip to step 7.
5. If the next four characters are not in the set DIGIT ZERO .. DIGIT NINE, 
skip to step 17.
6. Set date to valid; set year to the value given by the next four 
characters; advance 4 characters.
7. If the next character is whitespace, COMMA, or end of string, end as valid.
8. If the next character is not HYPHEN or HYPHEN-MINUS, abort as invalid.
9. If the next two characters are not in the set DIGIT ZERO .. DIGIT NINE, 
abort as invalid.
10. Set month to the value given by the next two characters; advance 2 
characters.
11. If the next character is whitespace, COMMA, or end of string, end as valid.
12. If the next character is not HYPHEN or HYPHEN-MINUS, abort as invalid.
13. If the next two characters are not in the set DIGIT ZERO .. DIGIT NINE, 
abort as invalid.
14. Set day to the value given by the next two characters; advance 2 
characters.
15. If the next character is whitespace, COMMA, or end of string, end as valid.
16. If the next character is not LATIN CAPITAL LETTER T abort as invalid.
17. If the next two characters are not in the set DIGIT ZERO .. DIGIT NINE, 
abort as invalid.
18. Set time to valid; set hour to the value given by the next two 
characters; advance 2 characters.