|
Posted by Jukka K. Korpela on 12/06/67 11:44
Toby Inkster <usenet200604@tobyinkster.co.uk> wrote:
> The mathematical equivalent for the UL element would be what is called a
> "set".
Since the UL element does not really mean an unordered collection (it would
not be correct for a browser, or a server, or a proxy to transform
<ul><li>foo<li>bar</ul> to <ul><li>bar<li>foo</ul>), I would rather say that
the UL element corresponds to a sequence (ordered list). A sequence does not
stop being a sequence just because it has no explicitly shown sequence
numbers.
> The set is an abstract concept, and can be dealt with mathematically, in
> many cases without worrying about how many (if any) elements it contains.
So is the sequence. It's just a design decision in HTML to disallow an empty
UL element (or, to put it positively, to require that it contain at least one
LI element.
In a more logical design, empty lists might be allowed as a placeholder for a
list, or as a construct that will dynamically be transformed to a non-empty
list by adding list items. But browsers (and other interested parties) would
then have to be prepared to handling empty lists meaningfully.
--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
Navigation:
[Reply to this message]
|