Re: xml-stylesheet issues (incl Arbortext behavior)

On Thu, 26 Feb 2009 21:55:31 +0100, Grosso, Paul <pgrosso@ptc.com> wrote:

> Arbortext Editor has a UI to allow a user to associate
> different stylesheets to their document for different
> outputs (e.g., edit view, print/pdf, single html file,
> chunked web, htmlhelp).  The UI causes an xml-stylesheet
> PI to be written for each output for which there is an
> association.  The generated PIs set the href, type,
> media, and alternate pseudo-attributes.
>
> So to test the various issues, I hand-edited the PI
> then brought up the document in Arbortext Editor,
> and looked to see which associations were actually made.

Thanks for looking into this.


> [...]
>
>> * media='' references HTML4 which is outdated; browsers use
>> the Media Queries spec here.
>
> I'm not sure there is a problem here.  HTML4 says:
>
>  The following is a list of recognized media descriptors
>  . . .
>  Future versions of HTML may introduce new values and may allow
>  parameterized values. To facilitate the introduction of these
>  extensions, conforming user agents must be able to parse the
>  media attribute value as follows....
>
> That leaves a lot of leeway.

So it would seem, until you realize that the parsing rules that HTML4 specifies (with a "must" conformance requirement) are different from those in the Media Queries spec.


> On the other hand, we could consider
> updating some of the references in the xml-stylesheet spec.
>
>>
>> * CSSOM integration:
>> http://dev.w3.org/cvsweb/~checkout~/csswg/cssom/Overview.html?
>> content-type=text/html;%20charset=utf-8#the-linkstyle defines
>> the LinkStyle interface that HTML <link> and
>> <?xml-stylesheet?> implement -- we should coordinate with Anne here.
>
> I don't quite understand this, but I'm pretty sure this is
> outside the scope of the xml-stylesheet PI spec.

I'm not sure why it's out of scope for the xml-stylesheet spec to define the DOM interface for xml-stylesheet PIs. HTML5 defines the DOM interface for HTML <link rel=stylesheet>. However I would be fine with having it defined somewhere else.


>> * CSS issues: it's unclear whether referencing an element
>> should work if type="text/css" -- the type of the document
>> would be an XML type which is not a CSS type, and browsers
>> largely don't support this anyway.
>
> I'm not sure I understand the issue here, but I'm not sure
> the xml-stylesheet spec needs to say anything about this.

Consider

   <?xml-stylesheet type='text/css' href='#foo'?>
   <test xml:id='foo'> test { background:lime } </test>

Should the background be lime, assuming the UA supports xml-stylesheet, xml:id and CSS? (Should the CSS spec answer this?)


> It's not up to this spec to say what kinds of stylesheets can
> profitably be associated with the xml document.  For example,
> Arbortext has its own stylesheet type that we associate with
> the XML document, and it doesn't matter that browsers wouldn't
> know what to do with it.  Perhaps some application could figure
> out how to use CSS to style an XML document.  It's not for
> this spec to say.

I agree that the spec shouldn't restrict what can be used with xml-stylesheet.

-- 
Simon Pieters
Opera Software

Received on Friday, 27 February 2009 06:26:13 UTC