[TYPO3-dev] XHTML compliant ?!

Christopher Torgalson bedlamhotel at gmail.com
Thu Nov 9 18:46:42 CET 2006


Hello,

On 11/9/06, x3n <x3n at molinier.eu> wrote:
>
>
> Christopher Torgalson a écrit :
> > On 11/9/06, x3n <x3n at molinier.eu> wrote:
> >> Hello everybody,
> >>
> >> I'm curently developing a frontend extension that displays ordinary
> >> HTML. It's quite simple and be be summed up in one line : return my_page.
> >>
> >> However I'm faced with an annoying problem. Somewhere in my HTML page, I
> >> there is a select box, with a default choice. The code looks like :
> >>         <option name="toto" selected>
> >
> > Martin is correct; in xhtml, all attributes must have a quoted value
> > (even if it's an empty string).
>
> Actually, you are write. I was mistaken because the validator of w3.org
> allows it for XHTML Transitional.


If it does, file it as a bug with the validator's authors: ALL
flavours of xhtml--since it's xml--require that any attributes have a
quoted value, and 'minimized' values are not permitted [1].

When I test the same thing, the validator throws this error:

> >> This code is compliant to XHTML Standards. It's summarized, but it
> >> doesn't matter. So, I was expecting to have a compliant output on my
> >> frontend, but it's not. I don't know why, but the selected is modified
> >> in selected="", which is no longer compliant...
> >>
> >> Do you have any clue why typo3 is modifying those markup ?
> >
> > I'd say the probability is 99.5% + that what you are seeing in the
> > source has nothing to do with TYPO3. When you view the source in many
> > browsers, you do /not/ see the exact code sent by the webserver...
> >
> I don't know about that, but the validator.w3.org points out the mistake.


I don't know what you were doing then--when I test a 'minimized'
attribute in the w3c validator, this is what I get:

"Error  Line 12, column 38: the name and VI delimiter can be omitted
from an attribute specification only if SHORTTAG YES is specified .

          <option value="foo" selected>foo</option>"

-- 
Christopher Torgalson




More information about the TYPO3-dev mailing list