- From: Stefan Mintert <mintert@irb.cs.uni-dortmund.de>
- Date: Wed, 5 May 1999 08:51:46 -0400 (EDT)
- To: www-html@w3.org
- cc: mintert@irb.cs.uni-dortmund.de
Hi! I already asked this before, but still have problems: Section 4.1.6 (of http://www.w3.org/TR/WD-html-in-xml/) about 'Empty Elements' contains this statement: "Empty elements must end with />. For instance, <br /> or <hr />." Earlier I asked: >Is it not allowed to write <br></br> in XHTML? and Frank Boumphrey answered (thanks Frank) > Yes XML allows you to do this, however to be compatible with down level > browsers it is suggested you write <br />. Note the space before the > vertical slash. > > This is a gross hack based on the fact that when parsing an element most > browsers look for either a 'space' or a '>' to read the element name. > > However in future browsers using an XML engine, you should be able to use > the syntax you suggested. I understand the compatibility issue, but I still think that the statement in 4.1.6 is a problem, because of the br element type declaration in http://www.w3.org/TR/WD-html-in-xml/DTD/xhtml1-strict.dtd which is: <!ELEMENT br EMPTY> How can a validating XML parser (that conforms to XML 1.0) check the constraint of sec 4.1.6 that it is an error to write <br></br>? Is it an error? WD-html-in-xml only says that <br /> is correct and that <br> is incorrect but nothing about <br></br>. After reading section 3.1 Document Conformance ("It must validate against one of the three DTDs found in Appendix A.") I guess that <br></br> is not an error (at least I hope so), but it's not explictly said in the WD. Wouldn't it be better to change 4.1.6 in this way (quoted from XML spec) "If an element is empty, it must be represented either by a start-tag immediately followed by an end-tag or by an empty-element tag. [...]" and to move the compatibility suggestion to Appendix C "Guidelines"? Thanks in advance for any answer. Bye, Stefan. +-----------------------------------------------------------+ Stefan Mintert UniDo: mintert@irb.informatik.uni-dortmund.de private: stefan@mintert.com +-----------------------------------------------------------+ "let the music keep our spirits high..." (Jackson Browne)
Received on Wednesday, 5 May 1999 08:56:27 UTC