Re: HTML Validator HTTP Accept

Am 11.12.2008 um 19:23 schrieb David Dorward:
>
> I think the point that Andreas is trying to imply is that if you use
> Apache's built in content negotiation to choose between something
> suitable for application/xhtml+xml and text/html then you have three
> URIs for any given set of content.
>
> (1) Content-negotiated (e.g. http://example.com/ )
>
> (2) XHTML (e.g. http://example.com/index.xhtml )
>
> (3) HTML (e.g. http://example.com/html )
>
> With the content negotiated URI picking one of the two representations
> of that document.
>
> You can then validate each representation by using its explicit URI
> instead of the content-negotiated one. I'm a big fan of URI based
> overrides of content-negotiation (since it makes testing easier and  
> lets
> you offer a list of options if the Accept header doesn't include any  
> of
> the content-types on offer), and suggest you implement it in whatever
> system you are using.

So how would you set this in practise, if you would NOT or canNOT  
provide two different physikal documents of one document on the  
webserver? Much content in real web life is generated content.  
Generated by content management software, blog software. Do you want  
to provide each and every single web document twice -- one document as  
XHTML document with XHTML doctype and served as application/xhtml+xml  
and the other identical document as HTML document with a HTML doctype  
and served with text/html?
How could this cope with real practise and real deployment out there?
How should the Apache configuration should be, to face these needs?
How should the software, which generates the content, be configured?

The best way I know of, to cope with this big challenge is to write  
dynamically the mimetype, a document is served, depending on what  
client is doing the request. Therefore this particulary client has to  
show his capabilities. So each client, which shows his capabilities,  
gets, what fits best to his needs. Is there a lack of these  
announcement of its capabilities, the webserver cannot serve  
appropriate.

Let's serve an XHTML 1.0 document http://example.com/index.xhtml or http://example.com/index.html 
. And the CMS environment is not able to produce this one document  
twice -- one as HTML document and one as XHTML document, and the  
webmaster is not willing to allow such redundances. So each single web  
document only exists once.
How do you serve this single web document either to clients capable of  
XHTML and capable of application/xhtml+xml AND clients NOT capable of  
XHTML and NOT capable of application/xhtml+xml so that these clients  
need to get a HTML document with the HTML mimetype text/html?
How do you configure a webserver like apache to solve this situation  
and to serve a choisce between two different mimetypes of ONE single  
document dependent on what the requesting client is capable of?
How would you do this WITHOUT relying on reasonable talking Accept- 
Headers?
As I know, (Apache) content negotiation relies on the existance of a  
minimum of TWO physical  documents to make a choice. But we only have,  
we only want ONE. So, what to do? What's the ideal webserver  
configuration (Apache) to solve this situation, while NOT relying on  
Accept headers and not using dynamically written stuff via PHP or JSP?


Sierk


-- 
Sierk Bornemann
http://sierkbornemann.de/

Received on Thursday, 11 December 2008 20:39:52 UTC