Re:lower case attributes in xhtml validator

Well, Brian, that's a good question.  As you may or may not be aware, XHTML is 
in many ways very similar to HTML.  Therefore, I assume to avoid combersome 
redundancy, the XHTML specification serves only to document the differences 
from HTML.  While the HTML 4.01 Strict DTD lists the acceptable values as 
"(GET|POST)", the specification states that the value is case-insensitive.  I 
suppose in XML attribute values listed in the DTD are case-sensitive such that 
you must use the case listed in the DTD.  That distinction should certainly be 
made abundantly clear in the XHTML documentation.  My question then is, will 
the user agent use the actual value of the attribute, or will it substitute the 
(correct) uppercase translation of the value in the HTTP request it sends? 

Brian Kavanaugh <bkavanaugh@usa.net> wrote on 10/23/01 5:29:29 AM:
>
>Why are you looking in an HTML spec for XHTML requirements? From the DTD, it
>looks like the only two methods allowed are "get" or "post", with "get" being
>the default if nothing is specified. 
>
>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd - 
>
>
><!--================ Forms ===============================================-->
><!ELEMENT form %form.content;>   <!-- forms shouldn't be nested -->
>
><!ATTLIST form
>  %attrs;
>  action      %URI;          #REQUIRED
>  method      (get|post)     "get"
>  enctype     %ContentType;  "application/x-www-form-urlencoded"
>  onsubmit    %Script;       #IMPLIED
>  onreset     %Script;       #IMPLIED
>  accept      %ContentTypes; #IMPLIED
>  accept-charset %Charsets;  #IMPLIED
>  >
>
>
>Jesse McCarthy <mccarthy36@earthlink.net> wrote:
>> I'm trying to validate a page as XHTML 1.0 strict and I'm getting this
>error:
>> 
>>   <form id="frm eForm" method="POST" action="">
>>                                    ^
>> Error: value of attribute "method" cannot be "POST"; must be one of "get", 
>> "post" 
>> 
>> 
>> So I looked in the HTML 4.01 spec and section 17.3 ( http://www.w3.
>> org/TR/html4/interact/forms.html#h-17.3 ) says: method = get|post [CI] 
>> This attribute specifies which HTTP method will be used to submit the form
>data 
>> set. Possible (case-insensitive) values are "get" (the default) and "post".
>See 
>> the section on form submission for usage information. 
>> 
>> It says the value of the method attribute of the FORM element is case-
>> insensitive.  Then I looked in the HTTP spec and section 5.1.1 says: 
>> 
>> 5.1.1 Method The Method token indicates the method to be performed on the 
>> resource identified by the Request-URI. The method is case-sensitive. 
>> 
>> It says the Method token is case-sensitive, and goes on to list the Methods
>in 
>> uppercase. 
>> 
>> So, by either definition, the validator is wrong, it is incorectly reporting
>an 
>> error.  I hope this can be remedied soon. 
>> 
>
>
>--
>Brian Kavanaugh
>Web Programmer
>Clarke Lanzen Skalla Investment Firm, Inc.
>14747 California St.
>Omaha NE 68154
>493-3313 x7155 / (800) 635-3427 x7155
>briank@clsinvest.com (work)
>bkavanaugh@usa.net   (home)

Received on Tuesday, 23 October 2001 10:56:21 UTC