Re: XML + (XSL | CSS) ?

Subject: Re: XML + (XSL | CSS) ?
From: Chris Lilley <chris@xxxxxx>
Date: Fri, 22 May 1998 20:54:18 +0200
Lisa Pease wrote:

> Daniel - I share your frustration learning XSL because of the paucity of
> materials yet available. I'm also extensively versed in CSS and so you would
> think my loyalties would be there. 

Is that CSS1 or CSS2?

> XSL allows me to do all kinds of things I could never do in CSS. Let's take
> a very simple example. Imagine I have a book catalog with 1000s of books in
> it. Each has this form in XML:
> <BOOK>
> <TITLE>...</TITLE>
> <ISBN>...</ISBN>... and so forth.
> Imagine now that I want to print it out in this form:
> Title:  [title]
> Author: [author]
> ISBN: [isbn]
> etc.
> Using XSL, I can put the text directly into the style sheet once, and have
> it repeat 1000 times for each book listing. In addition, I can select out
> only those portions which I am using for that list.

I hope that you are aware that CSS2 can do both of these things -
generated text, and supression of content.

> Now imagine being able to add script to a style within the style definition
> itself. You can do that in XSL. You can't in CSS.

Thats a design decision, not an oversight. It allows CSS stylesheets to
be edited without requiring script interpretation. Of course, CSS can be
used *with* scripts; but you can't put the script *in* the style sheet.

> I encourage you to explore the tutorial at the ArborText site
> ( in XSL. I think once you see that it is easier to use
> than it at first appears, you will see that it goes far beyond any current
> capabilities of CSS.

Yes, XSL is intended to go far beyond CSS2. It is intended to go beyond
both DSSSL and CSS. However, it will not get there all at once.

> But for large projects, and true XML-based applications, it seems
> XSL is far better suited to allowing not only the formatting but
> manipulation of the data than CSS is, at least in its current exercise.

XSL certainly allows manipulation of the data and CSS does not; document
manipulation is certainly a desirable feature and it is interesting that
this aspect seems to have caught the imagination of the user community
far more than the stylistic aspect. Current exprerimental
implementations seem to concentrate on the restructuring, sometimes at
the expense of providing any stylistic control at all. However, it is
arguable whether document transformation is the province of a style
language and whether transformation using a style language retains
sufficient semantics.

> Also - much of what you learned about CSS applies in XSL. You can still use
> familiar style properties like font-size, border, background-color and so
> forth! ;-)

Yes. And due to extensive efforts, still ongoing, those things will mean
the same in both CSS and in XSL.


 XSL-List info and archive:

Current Thread