Thomas Mlynarczyk wrote:
> Thomas 'PointedEars' Lahn schrieb:
>> Ex falso quodlibet.
>
> You mean that <... checked> does not "expand" to <... checked="something
> truish"> but rather to <... status="checked">, so checked is the value,
> not the name of the attribute and it's the attribute name which is
> omitted rather than the (implied) value?
No, that is what Andreas Prilop implied in
<
news:Pine.LNX.4.64.12...@zen.rrzn.uni-hannover.de> and
<
news:Pine.LNX.4.64.12...@zen.rrzn.uni-hannover.de>, and I
think he is mistaken. Based on that assumption, your argument based on his
argument can be conclusive in itself, but it can also be fallacious in
context ("ex falso quodlibet" is Latin for the fact that you can conclude
anything from a false premise).
I mean the exact opposite of his implication, that is: if anything, `border'
is the *name* of an attribute in both instances here, _not_ a value. So
there would be no point in looking for a suitable attribute name for a given
attribute value as it is the other way around. AFAIK, #IMPLIED in a DTD
means that the *value* of an attribute is implied, not the name [1].
Therefore, I think the current W3C Validator's behavior which results in
`<table border border=1>' (in context) as being Valid HTML 4.01 is at least
suboptimal.
I might be wrong about this, in which case I would appreciate *references*
to/*quotes* from the SGML standard from more SGML-savvy contributors to back
up their opinion, which so far are missing from this thread.
As for `checked', that is an attribute *name* of a boolean attribute (of
INPUT/`input' elements) [2], that is (AFAIK), an attribute that has the
property of only being able to be not specified or specified. In HTML 4.01,
a boolean attribute does not require a value to be specified; but if you
specify one, the value has to be the same as the attribute name for the
document to be Valid. AFAIK, this follows from HTML 4.01 being an
application of SGML [3].
>>> [1] I still fail to see why <input ... checked> becomes <input ...
>>> checked="checked" /> in XHTML rather than the more logical <input ...
>>> checked="true" /> (or some similar representation of a boolean value).
>>
>> Because XHTML is an application of XML, and either omitting the attribute
>> specification or specifying the attribute name as attribute value is the
>> *simplest* way of satisfying the constraints of an XML attribute
>> specification using a DTD.
>
> And why could checked="yes" or checked="true" or checked="1" not satisfy
> those constraints? checked="checked" is just ridiculously redundant.
See below.
> There is no boolean type in XML.
That is what *I* wrote.
> But clearly there can be attributes with boolean semantics. XML itself
> doesn't need to care, but the application using it. And for XHTML, the
> semantics here are clearly boolean: is this checked or not?
As there is no boolean *data type* in SGML or XML [4], additional
*semantics* in an XML application require additional support from a markup
parser (a showcase of this problem are the current HTML5 parsers, because
HTML5 as specified in the Working Draft is not driven by *formalized* syntax
rules). You can define a boolean data type in an XML application (that is,
a data type that has only members that are the equivalent of either "true"
or "false"), so that *syntax* constraints can be satisfied and validated
against, but that requires the declaration of that data type in an XML
Schema or at least an XML document using an XML Schema Definition where the
`xs:boolean' type is defined for the respective attribute. There is no such
requirement for XHTML, and XHTML 1.0 being defined as "a reformulation of
HTML 4 in XML 1.0" [5], it would have been not a good idea by the W3C if
they had placed such one on XHTML documents.
PointedEars
___________
[1] <
http://www.w3.org/TR/1999/REC-html401-19991224/intro/sgmltut.html#didx-
IMPLIED_attribute_value>
[2] <
http://www.w3.org/TR/1999/REC-
html401-19991224/interact/forms.html#adef-checked>
[3] <
http://www.w3.org/TR/1999/REC-
html401-19991224/appendix/notes.html#sgml-boolean>
[4] <
http://www.w3.org/TR/2008/REC-xml-20081126/>
[5] <
http://www.w3.org/TR/2002/REC-xhtml1-20020801/>
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16