Re: W3C complience checker and conformance



Deciding to do something for the good of humanity, Spartanicus
<invalid@xxxxxxxxxxxxxxx> declared in alt.html:
Mark Parnell <webmaster@xxxxxxxxxxxxxxxxxxxxxx> wrote:

Not in XHTML. XML has no concept of empty elements.

XHTML is merely a reformulation of HTML in XML, what is defined as an
empty element in HTML remains an empty element in XHTML.

Ick, did I really say that? What I meant was that XHTML requires all
elements to be closed, even if they are empty.

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.

"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.

--
Mark Parnell
My Usenet is improved; yours could be too:
http://blinkynet.net/comp/uip5.html
.



Relevant Pages

  • Re: W3C complience checker and conformance
    ... Not in XHTML. ... XML has no concept of empty elements. ... empty element in HTML remains an empty element in XHTML. ...
    (alt.html)
  • Re: W3C complience checker and conformance
    ... XML has no concept of empty elements. ... empty element in HTML remains an empty element in XHTML. ... But if XML doesn't have empty tags, as the previous poster said, then how can XHTML have empty tags since XHTML is a subset of XML should deal with certain tags, in a standardised way)? ...
    (alt.html)
  • Re: W3C complience checker and conformance
    ... in to a non empty element with null content. ... Like validators XHTML ... *recommended* to use a closing tag, ...
    (alt.html)
  • Re: Does
    ... Assuming "XHTML as XML, for only browsers that understand it" it's OK. ... You need to preserve the separate start and end tag, ... I've done it on a live site and had an outage for a whole ...
    (comp.infosystems.www.authoring.html)
  • Re: W3C complience checker and conformance
    ... Not in XHTML. ... XML has no concept of empty elements. ... empty element in HTML remains an empty element in XHTML. ...
    (alt.html)