Re: CSS-Transformation mechanism and modularizing CSS

[I may have already posted this or something like it. Apologies if I
have; a search of the archives did not uncover it -- or a reply...]

On Sun, 10 Oct 1999, Chris Lilley wrote:
> One thing that we seem to be lacking is a way to say precisely, in
> the CSS stylesheet, what renderer will be used for a particular
> subtree. In general, the CSS renderer will be used - one that does
> box-based, constraint-based layout. But in some cases (SVG; MathML)
> and arguably in others (inline PNG, inline JPEG, etc) there is a
> different renderer.

Wouldn't the namespace be used to decide that?

e.g.:

   <root xmlns="some-unrecognised-namespace">

      <foo> This would be rendered by the CSS renderer. </foo>

      <math xmlns=".../MathML">
         <mtext> This would be rendered by the MathML renderer. </mtext>
      </math>

      <svg xmlns=".../SVG">
         <text> This would be rendered by the SVG renderer. </text>
      </svg>

      <fo xmlns=".../XSL-FO">
         <inline> This would be rendered by the XSL-FO renderer. </inline>
      </fo>

      <html xmlns=".../XHTML">
         <p> This would be rendered by the CSS renderer, with the
         ua.css providing default styles. </p>
      </html>

   </root>

This is how this issue is dealt with in Mozilla, IIRC.

IMHO it is out of the scope of CSS to specify which renderer should be
used, as that implies that the CSS renderer is somehow more important
than some other renderer. For example, the following document:

   <root xmlns=".../XSL-FO">
      <foo> This would be rendered by the XSL-FO renderer. </foo>
   </root>

...would be rendered by the XSL-FO renderer, and the CSS one would
never have a look in.

Of course, the web browser is free to select whichever default
renderer it likes if it is given no other information -- and the CSS
renderer is ideal for this role since it is document type agnostic and
supports the idea of UA stylesheets.

(Various comments about the <?xml-stylesheet?> PI, the HTML <link
rel="stylesheet"> element and the "Link:" HTTP header having some
effect on renderer selection should probably be mentioned at this
point, but hey, it's late...)

-- 
Ian Hickson
"I take a Professor Bullett approach to my answers. There's a high
probability that they may be right."
  -- Dr Snow; Mechanics Lecturer at Bath University; 1999-03-04

Received on Thursday, 14 October 1999 18:08:18 UTC