Because it also states here

http://www.w3.org/TR/html/#h-4.6

That the correct way to write empty tags like br is <br/> with no space. The first link I provided (see below) points to what I interpret as an intermediate solution to support older browsers. The W3C document was written back in 2000 and I would expect all modern browsers to be able to understand <br/>, hence I think it is unnecessary to output spaces in all empty tags.

You can compare this to the problem with <script/> not working on IE. The intermediate solution is to output <script></script>, which works fine. But as soon as IE7 has found its way to most IE users, I think it is time to output the tag in the correct way, namely <script/>.

So my question remains: In a project which is targeted at newer browsers, can I configure MyFaces to output regular XHTML in which <br/> is written instead of the backwards compatible <br />?

Randahl




Andrew Robinson wrote:
The w3c from that link link says it *should* print a space before the
slash. Why do you want to turn the space off since it is "required"
for HTML compatibility? As for XML the space before the slash doesn't
matter (XML parsers don't care about whitespace in a tag).

On 10/17/06, Randahl Fink Isaksen <[EMAIL PROTECTED]> wrote:
MyFaces seems to follow the browser compatibility recommendations of
XHTML and outputs a space inside empty elements like this:

<br /> instead of <br/>

These recommendations were written back in 2000 (as can be seen here
http://www.w3.org/TR/html/#C_2), and today I would like to output normal
XML in which there is not a space inside empty elements.

Is it possible to configure MyFaces to render empty elements without spaces?

Randahl





Reply via email to