[Mono-devel-list] XhtmlTextWriter

Ben Maurer bmaurer at users.sourceforge.net
Sat Jul 5 11:51:25 EDT 2003

On Fri, 2003-07-04 at 20:25, Jeremiah McElroy wrote:
> That makes sense.  I had an idea earlier this evening of possibly specifying
> a flag in the constructor which allows the XhtmlTextWriter to produce 'pure'
> or 'dirty' XHTML.  By pure I of course mean the XHTML which you described
> and is described in the link you pointed us to - text/xml.  And dirty XHTML
> would be the XHTML described in the XHTML Recommendation - Appendix C.
This is silly. There is no such thing as 'dirty' XHTML. Either a
document is or is not XHTML. There is no "middle ground".

Here is what I would see as the best solution:
     1. The normal HtmlTextWriter should write HTML that follows as many
        of the rules of XML as possible without breaking compatibility
        with bad UAs. The XHTML Rec Appendix C should be used as a
        guideline here
     2. XhtmlTextWriter should *always* generate XHTML code without
        regard for old browsers.
     3. We should provide an option to always give browsers who accept
        text/xml that content. By default the option should be disabled
        because the hard coded HTML in many aspx pages is not XHTML.
     4. All content that is generated by Mono code should be XHTML
        compliant if the XhtmlTextWriter is used. All samples for xsp
        should be written with XHTML in mind.
     5. We should test the XSP samples with XHTML output enabled, with
        both the w3c xhtml validation tool and with a Mozilla based

More information about the Mono-devel-list mailing list