RE: Comments on last editor's draft of xml-stylesheet [glazman-1]

I responded to Daniel's comment about the media attribute
in the AssocSS spec, and he replied, not only rejecting
my suggested resolution, but with a lot more detail at
http://lists.w3.org/Archives/Public/www-xml-stylesheet-comments/2010Apr/0000

Assuming his response is not an April 1st joke, we'll need 
to figure out how to respond.  I've included a copy of
his email below, and I embed a few comments.

> -----Original Message-----
> From: Daniel Glazman [mailto:daniel@glazman.org]
> Sent: Wednesday, 2010 March 31 23:35
> To: Grosso, Paul
> Cc: www-xml-stylesheet-comments@w3.org
> Subject: Re: Comments on last editor's draft of xml-stylesheet
> [glazman-1]
> 
> Le 29/03/10 16:55, Grosso, Paul a écrit :
> > Daniel,
> >
> > Thank you for your comment [1] on the latest Association
> > Style Sheets draft [2].
> >
> > You suggest that:
> >
> >   in the definition of the 'media' attribute, [the spec]
> >   should probably specify that if the 'media' pseudo-attribute
> >   is absent then the stylesheet applies to "all" media.
> >
> > We have tried in this spec to stay away from discussing what
> > applications do with the information in this PI.  In fact,
> > there are applications beyond browsers--including some SGML/XML
> > editors--that make use of the information in this PI and that
> > ignore such a PI if the media pseudo-attribute is omitted, and
> > there is nothing wrong with that behavior.
> >
> > The (second) Note in section 2 currently reads:
> >
> > <quote>
> > The details of how conforming xml-stylesheet processors
> > exploit the information contained in xml-stylesheet
> > processing instructions are out of scope for this document,
> > as they may reasonably vary from processor to processor.
> > </quote>
> >
> > but that is somewhat of a misstatement.  We are changing
> > that Note to read:
> >
> > <quote>
> > The details of how applications
> > exploit the information contained in xml-stylesheet
> > processing instructions are out of scope for this document,
> > as they may reasonably vary from application to application .
> > </quote>
> >
> > The xml-stylesheet processor does not exploit the information
> > in the PI at all; it passes it on to the application which
> > decides what to do with it, and what the application does
> > with it is out of scope of the Associating Style Sheets
> > specification itself.
> >
> > Please reply (cc-ing www-xml-stylesheet-comments@w3.org) as
> > to whether you accept such a resolution of your comment.
> 
> I think I don't accept it for the following reasons:
> 
> 1. I agree 100% that some applications may deal with the media
>     pseudo-attribute in a way that entirely differs from how a
>     browser handles it. In fact, an editing tool may want to
>     completely ignore the media pseudo-attribute, whatever its
>     value or even its presence/absence, because otherwise it would be
>     impossible for instance to edit on a screen a document made
>     only to be printed, or edit on a desktop computer a document
>     created for |screen and (max-device-width: 320px)|. So this is not
>     a good enough reason to avoid specifying what means the absence of
>     the media pseudo-attribute.

I don't under his logic here.  We have maintained that the xml-ss 
processor has no "understanding" of the values of the pseudo-atts.
There are no conformance criteria on xml-ss processors about values
of pseudo-atts.  It makes no sense for this spec to say what it
means for a given pseudo-att to be omitted.

The xml-ss processor passes a set of pseudo-attribute assignments
to the application.  The application can tell if the media pseudo-att
has been assigned or not, and it can decide what that means to it. 

> 
> 2. the document specifies the media pseudo-attribute anyway. If
>     you want to entirely leave the processing to the document
>     processor, then you should say that the PI has pseudo-attributes
>     defined by
>     whatever the document language needs to process the link to the
>     stylesheet. The only pseudo-attribute defined by this spec should
>     be href then. Possibly the mediatype but I'm not even sure since
>     some document languages may decide to authorize only CSS and not
>     XLST, why not after all...

I have no idea what he is saying here.

Besides, we are issuing a 2nd Edition of an existing spec, so we are 
not in a position to do anything drastic.


> 
> 3. we have only two stylesheet languages on the web usable with this
>     PI and as far as I know, only CSS has the notion of rendering
>     media.

There have existed for years now tools that use this PI to
reference other stylesheet languages.

>     CSS itself will NOT deal with the specification of the media pseudo
>     attribute, obviously. In particular, it must not specify what's
>     happening if it's absent. This could belong to the document's
>     language. But then the absence or presence of the media pseudo-
>     attribute has an unpredictable behavior from the POV of a filter or
>     transformation tool that has no knowledge of that specification.
>     Let's imagine I have a XML document conformant to a given schema;
>     that XML dialect specifies that the absence of media means media=
>     "screen" and we want to transform that document on the fly into
>     XHTML. A generic filter is then unable to infer that it should
>     create a media="screen" (pseudo-)attribute in the PI or <link>
>     element in the XHTML result instead of leaving it unspecified.

I don't understand the above.

>     Furthermore, there is wide common practice about the media (pseudo-)
>     attribute used in the <link> element and the existing stylesheeet
>     PI. Its absence is a synonym to media="all". The current draft
>     breaks it.

I don't understand why the AssocSS spec has to say that an omitted
media implies media="all" if there is already wide practice that
this is the case.

> 
> 4. saying the absence of the media pseudo-attribute is a synonym to
>     media="all" (please note I am not saying it's a default value)
>     does not say anything about how a processor should handle it.
>     It is still up to the user agent and is not inconsistent, in my
>     opinion, with the spirit of this draft.

At least I think I understand this point up to the "spirit of the draft"
comment.  In my opinion, the spirit of this spec is not to say anything
about the meaning of pseuo-attribute values.

> 
> While we're at it, I just discovered that, unless I did not understand
> the 1st paragraph of section 4, the stylesheet PI remains
> usable only at the top of the document. If that's the case, I think
> this limitation should be lifted to allow scoped stylesheets. I

It does mean that the PI is only usable at the top.  This is the
current case for the 1st edition, and we aren't changing that.

We do not plan for this PI to allow scoped stylesheets.  A styling
language that wants to allow scoped stylesheets should define its
own way to associate such stylesheets with documents.  That is not
within the scope of this specification.

paul

> recommend taking a look at what HTML5 does on that topic. If you need a
> separate message about this to register this comment, please let me
> know. Please note that a |scoped| pseudo-attribute may be needed in
> that case.
> This comment is of course of no value if I misunderstod that section,
> in which case I apologize for that.
> 
> </Daniel>
> --
> W3C CSS WG, Co-chair

Received on Thursday, 1 April 2010 14:30:38 UTC