HTML 4.01: Erratium

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

HTML 4.01: Erratium

Alexei Pshenichnyi

Hello, guys.

I want to write about 3.2.2 Attributes section of HTML 4.01 Specification.

I am not sure whether it is wrong or not, but still…

This section specify that the only legal characters for attribute values are “letters (a-z and A-Z), digits (0-9), hyphens (ASCII decimal 45), periods (ASCII decimal 46), underscores (ASCII decimal 95), and colons (ASCII decimal 58)”, meanwhile later in specification I can see that value of some attributes (e.g. style) can contain semicolons (ASCII decimal 59).

So could you please clarify whether semicolon is a legal character or not?

 

Thank you in advance.

 

Best Regards
Alexei Pshenichnyi
Senior Software Engineer

EPAM Systems
Saratov office, Russia
GMT+3 (Standard) / GMT+4 (Daylight)

Office phone:       (8452) 29-04-14 (ext. 55346)
E-mail:                   
[hidden email]

WWW:             http://www.epam.com

CONFIDENTIALITY CAUTION AND DISCLAIMER
This message is intended only for the use of the individual(s) or entity(ies) to which it is addressed and contains information that is legally privileged and confidential. If you are not the intended recipient, or the person responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. All unintended recipients are obliged to delete this message and destroy any printed copies.

 

Reply | Threaded
Open this post in threaded view
|

Re: HTML 4.01: Erratium

bhawkeslewis
On 6/4/09 11:20, Alexei Pshenichnyi wrote:

> Hello, guys.
>
> I want to write about 3.2.2 Attributes
> <http://www.w3.org/TR/html401/intro/sgmltut.html#h-3.2.2> section of
> HTML 4.01 Specification.
>
> I am not sure whether it is wrong or not, but still…
>
> This section specify that the only legal characters for attribute values
> are “letters (a-z and A-Z), digits (0-9), hyphens (ASCII decimal 45),
> periods (ASCII decimal 46), underscores (ASCII decimal 95), and colons
> (ASCII decimal 58)”, meanwhile later in specification I can see that
> value of some attributes (e.g. style) can contain semicolons (ASCII
> decimal 59).

The full quotation is "In certain cases, authors may specify the value
of an attribute without any quotation marks. The attribute value may
only contain letters (a-z and A-Z), digits (0-9), hyphens (ASCII decimal
45), periods (ASCII decimal 46), underscores (ASCII decimal 95), and
colons (ASCII decimal 58). We recommend using quotation marks even when
it is possible to eliminate them."

> So could you please clarify whether semicolon is a legal character or not?

Judging from the above:

If the attribute value is delimited with single or double quotation
marks, semicolon is a legal character.

alt=";" is legal

If the attribute value is not delimited with single or double-quotation
marks, semicolon is an illegal character.

alt=; is illegal

--
Benjamin Hawkes-Lewis