On Tue, May 13, 2008 at 3:17 PM, XStandard Vlad Alexander
<[EMAIL PROTECTED]> wrote:
> Hi Nikita,
>
>
>  > Are you talking about putting an HTML doctype on
>  > XHTML 1.1-formatted code
>  Yes, but normally you would put XHTML 1.1 markup into an template written 
> for a different DOCTYPE as shown in this screen shot:
>
>  
> http://xstandard.com/94E7EECB-E7CF-4122-A6AF-8F817AA53C78/html-layout-xhtml-content.gif

Hi Vlad,
OK, I see what you're trying to do, but the example you provided isn't
valid XHTML. If it were, the META tag would have to end in a /> and
then it wouldn't be valid HTML anymore. In other words, it's a good
example of why you can't just change the doctype in order to switch
between HTML and XHTML. (In addition, the tags would have to be
lowercase if it were XHTML, but that's easy to remedy and also works
in HTML.)

The (X)HTML in the example and content negotiation code you've
suggested is probably adequate (from a practical standpoint) for many
Webmasters, but it isn't standards compliant. Given the name of this
list, that seems pretty significant.

Cheers



> -------- Original Message --------
>  From: Nikita The Spider The Spider
>
>
> Date: 2008-05-13 8:43 AM
>  > On Mon, May 12, 2008 at 10:57 PM, XStandard Vlad Alexander
>  > <[EMAIL PROTECTED]> wrote:
>  >> HTH wrote:
>  >>  >...server has to do content negotiation in order to send
>  >>
>  >>> text/html with one doctype (HTML or XHTML 1.0) to IE users and
>  >>  >application/xhtml+xml/XHTML 1.1 to everyone else. That means
>  >>  >you're generating two copies of all of your content
>  >>  Assuming your are not writing static pages, you only need to generate 
> one copy of content in XHTML 1.1 format and then serve it as any version of 
> HTML as you like.
>  >
>  > I'm not sure what you mean -- I understand the XHTML 1.1 part, but
>  > what do you mean then by "serve it as any version of HTML"? Are you
>  > talking about putting an HTML doctype on XHTML 1.1-formatted code, or
>  > serving XHTML 1.1 with the text/html media type, or something else?
>  >
>  >
>  >>  HTH wrote:
>  >>  > Furthermore, content negotiation itself is some work to
>  >>  > get done correctly
>  >>  At most, maybe 10 lines of code. Please see:
>  >>  http://xhtml.com/en/content-negotiation/
>  >
>  > My point exactly -- that code is not correct. It produces the wrong
>  > result when presented with an Accept header of */* which is valid (see
>  > http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1) and
>  > indicates that the client can accept application/xhtml+xml.
>  >
>  > The code is also wrong in that the Accept header can contain
>  > preference indicators ("q=..."). It's valid for a client to indicate
>  > that it accept both text/html and  application/xhtml+xml but prefers
>  > the former. A straightforward substring search won't get the job done
>  > correctly.
>  >
>  > It's true that these are unusual cases and the consequences of getting
>  > it wrong are minor (text/html sent instead of application/xhtml+xml).
>  > But my point was that it is easy to make mistakes, even if you're
>  > getting it right most of the time.
>  >
>  > There was a recent discussion (pretty vocal, if I remember correctly)
>  > on the W3 Validator list about the subject of content negotiation
>  > involving people with a deeper understanding and appreciation of the
>  > standards than me. You might find it interesting reading.
>  >
>  > Cheers
>  >



-- 
Philip
http://NikitaTheSpider.com/
Whole-site HTML validation, link checking and more


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to