associatng stylesheets and @media

[note, I've been off work unwell for a couple of days, will try to be on
the call tomorrow in any case]


Maybe it will help to take a step back.  It will help me at least; I'm
sorry that I came into this revision of the spec rather late and missed
much of the discussion, and now have to try & resolve these
objections...


The situation as I see it:

There are the following cases for @media:

(1) the style sheet type is not CSS or XSLT (e.g. it's FOSI)
(2) the style sheet is XSLT, and we're generating (X)HTML
(3) the style sheet is CSS, for some non-HTML XML document type
(4) the style sheet is CSS, and the document is XHTML
(5) the style sheet is XSLT and we're *not* generating (X)HTML

In case (1) we can't say much about @media. We should probably not
constrain the syntax of the values based on the CSS draft.

In case (2), there are the following cases:
(2a) a Web browser
(2b) something else.

The Web browser case is special in that it first runs the XSLT to
generate HTML, and then displays the document, so the media is always
"screen" - and the @media attribute is likely ignored, or at least
should defalt to "screen".

Once the HTML has been generated and displayed, and the XML discarded,
the user might press "Print".  In this case, if the *generated* XHTML
contains a link to a stylesheet
<link rel="stylesheet" type="text/css" media="print" />,
that will be used.  The XML processing instruction is long gone by this
point, so the XSLT transformation had to generate this link in the HTML
in advance.

Interoperability between browsers in this case, 2a, seems to be what Tim
is most concerned about, and maybe Daniel G. as well.  That is, do all
the Web browsers do the same thing... there was talk on our call about
interoperability across the different cases, but that's a red herring I
think.


In case 2b, the processor might or might not have expectations about
media; again, CSS values don't necessarily apply, as it depends on the
environment.


In case (3), the user agent (e.g. a Web browser, an XML editor, a
program to format XML for print) should use the @media attribute as
appropriate to select a CSS stylesheet. A missing @media value could be
an error, or the value could default to "screen" as for current CSS in
HTML. It might be useful for us to say this explicitly.


Case (4) only differs from case (3) in that the processing instruction
and the HTML link and/or style elements can all specify style sheets,
and we probably should say what happens.

Case (5) is the same as case (1) in terms of @media, we can't really say
anything about some unknown processor generating something unknown for
some indiscernible purpose.

There is also a case (6) which is that the value of @media is considered
malformed according to the relevant style sheet specification, or there
is some other error.  A helpful processor would report an error, and in
any case the processing instruction should then be ignored.


Did I get all the cases?

Liam


-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org www.advogato.org

Received on Wednesday, 28 July 2010 02:27:24 UTC