RE: Q: More complex page patterns?

Jelks Cabaniss writes:
 > Håkon Lie wrote:
 > 
 > > We foresee people using CSS if their source documents don't need
 > > element reordering or other transformations before being presented
 > > to the user. Vice versa, XSL will be used if element reordering or
 > > other transformations are required/requested.
 > 
 > Won't the DOM also handle element reordering?  What will XSL be capable of that
 > the DOM applied to CSS + (HTML | XML) can't handle?

Yes, you should be able to use the DOM. But the difference is that to
use the DOM you need to write a program in some programming language,
while with XSL you can do most things declaratively.

Another difference is that XSL will be a W3C speoification, while the
programming language will be specified by some other organization. But
that probably won't matter much in practice.

 > 
 > Also, I have seen James Clark's note for handling linked CSS stylesheets; is
 > there a proposal to date for embedded and inline CSS in XML?

Not yet, although the idea has been mentioned in the CSS working group
and some people have given it some thought. One possibility is to use
the same PI mechanism to declare attributes and elements that act like
HTML elements/attributes. The mechanisms in HTML that CSS treats
specially are:

  - the LINK element
  - the STYLE element
  - the STYLE attribute
  - the CLASS attribute
  - the ID attribute

For example,

    <?xml:stylesheet style-attribute="layout"?>

could declare that in the following XML element the attribute "layout"
performs the same role as the "STYLE" attribute in HTML. Of course, it
could also be an (empty) element instead of a processing instruction.

Another idea is to use reserved names: "xml:style", "xml:class",
etc. This avoids the need for a declaration, but makes the documents
potentially less readable (because of the "xml:" prefix and because
the names are always English words).

    <xml:style>
      header {text-align: center}
    </xml:style>
    ...
    <header xml:style="font-size: x-large">...</header>

There is possibly a link to the "namespace" idea here.

Suggestions welcome.


Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos/                              W3C/INRIA
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 4 93 65 76 92               06902 Sophia Antipolis Cedex, France
  +33 (0)4 92 38 76 92 (<--- after 5 Jan 1998)

Received on Tuesday, 9 June 1998 17:33:49 UTC