"Richard Cornford" <Ri*****@litotes.demon.co.ukwrites:
Chris Morris wrote:
hug wrote::
<snip>
... I am having difficulty finding the maximum allowable
length of the id string. ? tia.
http://www.w3.org/TR/html4/types.html says:
ID and NAME tokens must begin with a letter ([A-Za-z]) and may be
followed by any number of letters, digits ([0-9]), hyphens ("-"),
^^^^^^^^^^
underscores ("_"), colons (":"), and periods (".").
No maximum length
From the SGML Declaration of HTML 4:-
| ATTSPLEN 65536 -- These are the largest values --
| LITLEN 65536 -- permitted in the declaration --
| NAMELEN 65536 -- Avoid fixed limits in actual --
| PILEN 65536 -- implementations of HTML UA's --
I believe that NAMELEN may be the significant setting (65,536
characters), though the note suggests that it should not actualy
reprresent a limit in practice.
Yes, it's the largest value they were allowed. The intended effect is
"unlimited", although a strict SGML parser might disagree. Of course,
browser bugs and memory limitations might disagree first. The values
were quite a bit lower in 2.0 and in the 3.0 drafts - I suspect they
decided to set them to 'effectively unlimited' for lack of a better
value.
(I think LITLEN - the "Maximum length of a delimited literal" - is the
relevant one, but since they're all the same value it doesn't really
matter in this context)
The next one down:
TAGLVL 100
is interesting, too - no more than 100 levels of tag nesting are
allowed.
--
Chris