logo       

Re: xhtml compatibility guideline: msg#00051

java.enhydra.xmlc

Subject: Re: xhtml compatibility guideline

On So, 2002-12-21 at 22:28, Mark Diekhans wrote:
> > One important question: XHTML Compatibility Guidelines (compatibility of
> > XHTML with HTML browsers) says that the single tags without a closing
> > tag (<br />) should keep a space between the tag and the "/>"). The
> > XHTML files
>
> The suggestion to output <br /> is a suggestion because a few common browers
> that don't understand xhtml are able to render this invalid html in some
> reasonable manner. This is only going to work with bug-compatible browsers.

"bug-compatible"? And BTW, it wasn't about <br> only - it was a general
suggestion for all single tags (input, select etc).

> XMLC doesn't record the original format of tags. The information contained in
> the tags is represented by the DOM object structure. When the DOM is
> formatted into a document, tags are created from the object structure
> according to the HTML or XML rules.

I knew that. I just thought it would be cool to follow the compatibility
suggestions - especially in case when someone tries to produce XHTML
readable by current browsers (see my previous reply to Jacob that
suggested to add a new XMLC command line switch).

> While it would be possible to change the formatter to add the white space in
> tag, XMLC offers a much better option. A HTML or XHTML document is able to
> represent the same data, it just a different formatting. A DOM is an object
> representation of the same data (but not the format). The XMLC formatter
> supports formatting a document that was originally HTML as XHTML, or
> one that started out as XHTML as HTML.

I understand. But since the original static design is in XHTML and is
tuned up to look well on most browsers I believe I should keep the
output formatted in XHTML again, just for sure.

I think that if XMLC had an option "produce XHTML compatible with 6.0
browsers" (or something alike) it could:

1) emit an extra space before the "/>" of single tags (br, input, select
etc.)

2) change the pregenerated methods buildDocument() and the other one to
contain "text/html" instead of "text/xml" so that javascript would work
as expected (see my reply to Jacob).

What do you think?

Petr


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise