Re: xhtml vs html 4 strict
Spartanicus wrote:[color=blue]
> "Philipp Lenssen" <info@outer-court.com> wrote:
>
> [XHTML]
>
>[color=green][color=darkred]
>>>>It's an option if you want to force yourself or a team to be
>>>>case-sensitive and to always close tags.
>>>
>>>XHTML documents must use lower case for all HTML element and attribute
>>>names. That's not the same as being case sensitive.[/color]
>>
>>XHTML is case-sensitive for elements. HTML4 is not. How is that not
>>being case-sensitive?[/color]
>
>
> Because upper case is invalid in XHTML element and attribute names.
> In Javascript function names are case sensitive, Foobar!=fooBar, but
> both are valid.[/color]
Your opinion that XHTML is case-insensitive is in direct opposition to
the view of the W3C. Read section 4.2 of the XHTML 1.0 specification:
"XHTML documents must use lower case for all HTML element and
attribute names. This difference is necessary because XML is
case-sensitive..."
<URL:http://www.w3.org/TR/xhtml1/>
[color=blue]
>
>[color=green][color=darkred]
>>>Using XHTML doesn't force anything on anyone. Validating against an
>>>XHTML DTD will fail if elements and/or attribute names are not lower
>>>case, and if elements are not closed. This is not particular to XHTML
>>>DTDs.[/color]
>>
>>But in HTML4, you may leave certain elements open. This is particular
>>to XHTML/XML then.[/color]
>
>
> Only for empty elements, which unlike closing non empty elements has no
> relevance for a parser. In fact a conforming HTML parser would choke on
> XHTML.
>[/color]
Of course non-empty elements with optional closing tags, such as <P>,
are conveniently ignored. They are perfectly valid in HTML 4.01, but
not XHTML, which is the point Philipp was making.
--
Rob
Spartanicus wrote:[color=blue]
> "Philipp Lenssen" <info@outer-court.com> wrote:
>
> [XHTML]
>
>[color=green][color=darkred]
>>>>It's an option if you want to force yourself or a team to be
>>>>case-sensitive and to always close tags.
>>>
>>>XHTML documents must use lower case for all HTML element and attribute
>>>names. That's not the same as being case sensitive.[/color]
>>
>>XHTML is case-sensitive for elements. HTML4 is not. How is that not
>>being case-sensitive?[/color]
>
>
> Because upper case is invalid in XHTML element and attribute names.
> In Javascript function names are case sensitive, Foobar!=fooBar, but
> both are valid.[/color]
Your opinion that XHTML is case-insensitive is in direct opposition to
the view of the W3C. Read section 4.2 of the XHTML 1.0 specification:
"XHTML documents must use lower case for all HTML element and
attribute names. This difference is necessary because XML is
case-sensitive..."
<URL:http://www.w3.org/TR/xhtml1/>
[color=blue]
>
>[color=green][color=darkred]
>>>Using XHTML doesn't force anything on anyone. Validating against an
>>>XHTML DTD will fail if elements and/or attribute names are not lower
>>>case, and if elements are not closed. This is not particular to XHTML
>>>DTDs.[/color]
>>
>>But in HTML4, you may leave certain elements open. This is particular
>>to XHTML/XML then.[/color]
>
>
> Only for empty elements, which unlike closing non empty elements has no
> relevance for a parser. In fact a conforming HTML parser would choke on
> XHTML.
>[/color]
Of course non-empty elements with optional closing tags, such as <P>,
are conveniently ignored. They are perfectly valid in HTML 4.01, but
not XHTML, which is the point Philipp was making.
--
Rob
Comment