W3C home > Mailing lists > Public > www-html@w3.org > September 2001

RE: Associating style sheets with XHTML documents via processing instruction?

From: Christian Wolfgang Hujer <Christian.Hujer@itcqis.com>
Date: Sun, 9 Sep 2001 15:49:41 +0200
To: "Sean B. Palmer" <sean@mysterylights.com>, <www-html@w3.org>
Message-ID: <000101c13936$462176e0$b58f9b3e@andromeda>
Hello Sean,

> -----Original Message-----
> > I interpret it the following way:
> > A user agent which is capable of XHTML and XML, and which
> > interprets the stylesheet processing instruction for xml documents,
> > also must interpret the stylesheet processing instruction for xhtml
> > documents since xhtml documents are xml documents.
>
> I'd guess that if the XHTML is being sent as text/html, the UA should
> interpret the <link/> element(s), and if being sent as text/xml, the
> stylesheet PI(s).

1. There more cases than these two simple:
a) being sent as text/html
b) being sent as text/xml
c) being sent as text/xhtml
d) being loaded locally in a program that detects files from the ending with
ending ".xml"
e) being loaded locally in a program that detects files from the ending with
ending ".html"
f) being loaded locally in a program that detects files from the ending with
ending ".xhtml"
g) being loaded locally in a program that detects files from a hidden file
type information (as on Mac System and sometimes Amiga OS Icons /
.info-files), where the file type is said to be XML
h) being loaded locally in a program that detects files from a hidden file
type information (as on Mac System and sometimes Amiga OS Icons /
.info-files), where the file type is said to be XHTML
i) being loaded locally in a program that detects files from a hidden file
type information (as on Mac System and sometimes Amiga OS Icons /
.info-files), where the file type is HTML
j) being loaded locally in a program that auto-detects files from their
content (like Unix Mime Magic or Amiga Datatypes), where the software
detects it is html
k) being loaded locally in a program that auto-detects files from their
content (like Unix Mime Magic or Amiga Datatypes), where the software
detects it is xml
l) being loaded locally in a program that auto-detects files from their
content (like Unix Mime Magic or Amiga Datatypes), where the software
detects it is xhtml

Then if the software detects it is XHTML, additionally it is of interest
wether it behaves like simple "stupid" HTML software or like "intelligent"
XML software

That's current state, and before something becomes current practice that
might cause problems, I request... (see after 3.).

2. It is legal to send xhtml as text/xml to an XHTML user agent.
What if it only contains <link rel="stylesheet"/> elements, but no
<?xml-stylesheet?> processing instructions?

3. It is legal to send xhtml as text/html to an XHTML user agent.
What if it only contains <?xml-stylesheet?> processing instructions, but no
<link rel="stylesheet"/> elements?

I really request the W3C releases a recommendation or at least a note about
this to clearify it.

My interpretation is that an XHTML user agent must interpret both, the
<?xml-stylesheet?> processing instructions and the <link rel="stylesheet"/>
elements, because the XHTML document is both, an XML document, and a HTML
document, no matter wether the MIME type is specified as "text/html",
"text/xml" or "text/xhtml", and additionally, it is "text/plain". It's the
content, that is of a certain type, the MIME type specified in the
Content-Type HTTP Response Header is just a helper so the software needn't
guess the Content-Type from the content, which, of course, is easily
possible, or from the content's file ending, which, of course, is nonsense
(but Microsoft still does it in the third century... ;).

Greetings

Christian Hujer
Received on Sunday, 9 September 2001 09:56:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:49 GMT