Re: Re: sloppiness & stupidity
| From: | Ashley Sheridan | Date: | Wed, 17 Jun 2009 23:38:55 +0000 |
| Subject: | Re: Re: sloppiness & stupidity | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-294193@lists.php.net to get a copy of this message | ||
On Wed, 2009-06-17 at 18:59 -0400, tedd wrote:
> At 10:51 PM +0100 6/17/09, Ashley Sheridan wrote:
> >On Wed, 2009-06-17 at 23:05 +0200, Nisse Engström wrote:
> >> On Wed, 17 Jun 2009 10:18:09 +0100, "Ford, Mike" wrote:
> >>
> >> > This is very true -- but XHTML requires *all* attributes to have a
> >> > value, so an XHTML conformant page will use <select
> >> > multiple="multiple"
> >> > name="selector"> (or something similar such as <select
> >> > multiple="yes"
> >> > name="selector">). The only inconsistency here is that different
> >> > people
> >> > have chosen to validate against different standards.
> >>
> >> The multiple attribute only has one value: "multiple", so
> >> it has to be <select multiple="multiple">. I don't think
> >> "yes" cuts the mustard. In HTML, you can shorten it to
> >> <select multiple>.
> >>
> >>
> >> /Nisse
> >>
> >I read somewhere that the XHTML standards say that for all attributes
> >that would normally be standalone in HTML, they should be given a value
> >that is the same as the attribute name, so you would use
> >multiple="multiple", selected="selected", checked="checked",
> >etc. As far
> >as I know, using this in regular HTML won't cause it to choke either, as
> >the parsers tend to only look at the existence of the attributes, not
> >the values they may or may not have.
> >
> >Thanks
> >Ash
>
>
> Ash:
>
> As I understand it and is my experience, that is
> true -- a stand-alone HTML attribute should be
> equal to itself, such as selected="selected", or
> more specifically selected="SELECTED". However,
> it will still work but will throw a validation
> error/warning in some DOCTYPEs, such as XHTLM. I
> don't know of any other DOCTYPE that might throw
> such as error.
>
> Cheers,
>
> tedd
>
> --
> -------
> http://sperling.com
> http://ancientstones.com http://earthstones.comIöÿ
> MÇü—<¥¹¦%¬
>
I was under the impression that in XHTML *all* attributes had to have
values, even if just empty strings?
Thanks
Ash
www.ashleysheridan.co.uk