|
Posted by Spartanicus on 05/04/06 10:14
Mark Parnell <webmaster@clarkecomputers.com.au> wrote:
>> Using a closing tag for empty elements with no content turns an element
>> in to a non empty element with null content. Like validators XHTML
>> renders won't choke on that, but it's incorrect XHTML.
>
>Either is valid according to the XML and XHTML specs. It's not
>*recommended* to use a closing tag, but it's still valid.
It is valid, but DTD validation has it's limitations, even more so for
XHTML, this is one of those limitations.
>"The representation of an empty element is either a start-tag
>immediately followed by an end-tag, or an empty-element tag."
>http://www.w3.org/TR/2004/REC-xml11-20040204/#sec-starttags
>
>"Empty elements must either have an end tag or the start tag must end
>with />"
>http://www.w3.org/TR/xhtml1/#h-4.6
>
>Incidentally, the XML spec (see link above) defines elements without any
>content "empty", regardless of whether they are defined as EMPTY in the
>DTD.
XHTML does not equal XML.
--
Spartanicus
[Back to original message]
|