cgi module does not work fully with XHTML 1.0 Strict DTD

Jon Ribbens jon+usenet at unequivocal.co.uk
Wed Jun 4 12:18:31 EDT 2003


In article <mailman.1054742348.1992.python-list at python.org>, M. Kirchhoff wrote:
> It seems that the FieldStorage() method of the cgi module collects only form
><select> items using the "name" attribute (for example, <select
>name="item1"> ).
> 
> With the newer XHTML 1.0 Strict DTD, "name" is deprecated and has
> been replaced with "id" (for example <select id="item1"> ).  The
> method does seem to work with XHTML 1.0 Transitional, as this allows
> for the use of the "name" and "id" attributes simultaneously.

You are mistaken - the 'name' attribute is only deprecated where it is
used as a fragment identifier. In the <select> tag you should still
use name="foo". This is nothing to do with Python's CGI module and no
change to the CGI module could make any difference since it is your 
browser that decides what form variables to send.




More information about the Python-list mailing list