Re: XHTML Problems



Tim <tim@xxxxxxxxxxxxxxxxxxxxxx> wrote:

>> Are one of you talking about filenames, and the other about URIs?

Andy Dingley <dingbat@xxxxxxxxxxxxxx> posted:

> I'm talking about both. Two sorts of file extension is good, as it
> labels the content.

Unnecessary, except to the page author. People clicking links don't need
to know whether it's HTML, XHTML, a flat file or dynamically generated,
etc.

It also *doesn't* label the content. You might think that it does, but
it's only a hint at what you might get. I can serve you anything with a
..html suffixed link. And how many of us have tried to right-click and
download some file, seeing a something.exe link, only to end up saving an
HTML page which was a click-through to the download?

> Two sorts of extension embedded in the URL is bad, as it makes
> link-management messy.

Unnecessary, again. That's not how it works. Going back to my prior
example, as below. The links are ambiguous.

For now, and evermore, I can offer a link about "configuring my DNS
software" at <http://example.com/configuring_my_DNS_software> and everyone
will be able to read it, whether I write it in HTML today, XHTML next
month, or something else in two years time.

There's one link, and the server provides what's needed, behind the scenes.
If I provide just one file, that's all everybody gets (as the requested
URI). If I provide different versions, their browser and my server can
decide what's best. If we can't decide, the browser *can* offer a list of
choices.

I don't ever have to get people to change their bookmarks, re-write
documentation, etc.

>> You canhave both filenames in use (depending on content), and not refer
>> to the filename specifically with requests (i.e. sans-suffix).
>>
>> e.g. Request http://example.com/pagename
>> And get pagename.html or pagename.xhtml, depending on what's stored
>> on the server, and what suits the browser (should there be a choice).

> My Apache-fu is weak.
>
> Is it practical to do this when there's only one file (.xhtml) and the
> browser wants only text/html ? I know the server can choose to serve a
> .html file instead of the .xhtml, but AFAIK this would require two
> copies of the content on the server.

Why bother? HTML and XHTML provide the same information to the reader.
Carry on using HTML on existing documents, when you add new documents or
modify old ones, you can make them XHTML, and forget about dual serving.

Personally, I strongly advise against using XHTML. It's just so seriously
broken in the most prevalent client, and the usual daft way of serving it
destroys any benefits of using it with better clients.

> What I'm looking for is content negotiation that can silently choose to
> deliver either XHTML, or Appendix C XHTML-as-HTML, according to browser
> acceptance. Is this possible ? Would you happen to have an example of
> it that we might learn from ?

Possible, but why bother. And I can't think of an example, because it's
pointless.

Also, trying to serve one to this and the other to that will fall right
into that age-old recipe for disaster - browser sniffing (something that's
unreliable).

--
If you insist on e-mailing me, use the reply-to address (it's real but
temporary). But please reply to the group, like you're supposed to.

This message was sent without a virus, please delete some files yourself.
.



Relevant Pages

  • Re: FAQ Topic - How do I POST a form to a new window? (2011-01-03)
    ... user-defined DTD) declaring the Transitional variant of HTML 4.01 and ... XHTML 1.0 DTDs. ... HTML* requires that. ... have been tested in at most one browser. ...
    (comp.lang.javascript)
  • Re: Unable to play .wax file using wm10 or wm11
    ... nearly all music was put on a streaming server in the last century, ... now is sufficient to use an ordinary html server in many cases. ... The code validates fully as xhtml 1.1 and as css on the ...
    (microsoft.public.windowsmedia.player)
  • Re: Web Layout
    ... There is absolutely no advantage to using XHTML over HTML, and it will certainly not help in this instance. ... You need to serve valid and compliant HTML and CSS to the browser, and in 99% of cases, you will not have problems. ... It is certain that Opera and FF are correctly rendering the code, and that IE is doing its best to make sense out of invalid code. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: How do I get HTML sent to server?
    ... sees in a client browser. ... html does only approximately show how different browsers, ... html is available on the server and can be directly taken from the ... html does not show the changes made to the DOM on the browser. ...
    (comp.lang.javascript)
  • Re: The XHTML Factor
    ... Well, XHTML 1.0 has nothing more to offer than HTML 4.01 has, it has ... And indeed the browser with the most market share, MS Internet Explorer, ... deliberate nesting error, and the other iframe containing exactly the ...
    (microsoft.public.dotnet.framework.aspnet)