Forum OpenACS Development: Re: Moving to XHTML

12: Re: Moving to XHTML (response to 11)
Posted by Gustaf Neumann on
There are two different issues: (a) encoding the HTML document such the result is valid XHTML (1.0, 1.1, ..) and (b) telling the user agent (browser) that the media type (content-type) is valid XHTML.

The plugin of wordpress just alters the the media type according to the "accept" request header field (see rfc 2616, section 14.1) and sends in both cases the identical file. Same seems to happen with Note, that this is only possible for XHTML 1.0, not for XHTML 1.1 or newer. For just altering the media-type i don't see the need of having different master templates ("ns_set update [ns_conn outputheaders] Content-Type" should be sufficient). For purpose (a) there is no other option than working though the code. XHTML 1.1 is a modularized version of XHTML 1.0 with only little differences, but XHMTL 2.0 won't support e.g. the <IMG> tag, this will be an even bigger step (XHTML 2.0 is not released).

For now XHTML 1.0 Transitional is already an ambitious target.