W3C home > Mailing lists > Public > www-validator@w3.org > November 2013

The "multiple" attribute (Was: Re: [VE][106] Add Subject Here)

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Wed, 27 Nov 2013 10:15:09 +0200
Message-ID: <5295AA0D.6050302@cs.tut.fi>
To: Alejandro Olryd <aolryd@gmail.com>, www-validator@w3.org
2013-11-26 23:23, Alejandro Olryd wrote:

> When I validate my page it says that the attribute "Mulitple" for
> <input type="file"> is not valid for the DOCTYPE… however, i've read
> all the techno babble for W3C and IT IS SUPPORTED!!!

Specifications do not support markup constructs (browsers may); the 
define them as allowed or disallowed, valid or invalid.

> Validating http://www.moneysolutions.com.mx/contacto.php Error [106]:
> "X is not a member of a group specified for any attribute"

The page declares the XHTML 1.0 Strict document type. The definition of 
that document type is the only thing that matters when considering 
whether the attribute is valid. And it is not:

<!ATTLIST input
   type        %InputType;    "text"
   name        CDATA          #IMPLIED
   value       CDATA          #IMPLIED
   checked     (checked)      #IMPLIED
   disabled    (disabled)     #IMPLIED
   readonly    (readonly)     #IMPLIED
   size        CDATA          #IMPLIED
   maxlength   %Number;       #IMPLIED
   src         %URI;          #IMPLIED
   alt         CDATA          #IMPLIED
   usemap      %URI;          #IMPLIED
   onselect    %Script;       #IMPLIED
   onchange    %Script;       #IMPLIED
   accept      %ContentTypes; #IMPLIED


So the "multiple" attribute is not allowed. A more convenient way to 
check out such things is to consult the HTML 4.01 specification, since 
XHTML 1.0 is mostly (though not completely) just XML syntax (XML 
serialization) for HTML 4.01. You can check from the table of all 
attributes at
that the "multiple" attribute is allowed in the <select> element only.

The "multiple" attribute for <input> is being introduced in HTML5. You 
can use an experimental HTML5 validator (which checks against some 
unspecified HTML5 draft) by clicking on "More Options" in the 
validator's user interface and then selecting HTML5 in the "Document 
type" dropdown.

HTML5 validation is very different from classic SGML and XML validation 
that the W3C validator otherwise does. In this case, you would get some 
error messages related to "name" attributes in <meta> tags (HTML5 is 
rather picky about them, e.g. requiring you to use dcterms.title rather 
than dc.title - on the other hand, on web pages, Dublin Core meta tags 
are basically write-only markup). And you would get an error message 
about </input>, which is not recommended even in XHTML 1.0. And about 
width="50%", since HTML5 is rather Puristic about presentational markup 
and tells us to use CSS and not HTML to scale images.

Received on Wednesday, 27 November 2013 08:15:41 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:18:09 UTC