eXtensible Style Language (XSL) is a user-extensible and primarily declarative mechanism for adding style (e.g. fonts, colors, spacing) to XML documents. For background information on style sheets, see the Web style sheets resource page. Discussions about XSL are carried out on the the DSSSL-List at mulberry.com and on comp.infosystems.www.authoring.stylesheets.
What's New
- 980128 The W3C Working Group for XSL met for three days in San Jose, CA, USA to start work on XSL. Weekly teleconferences will be used to coordinate and track progress.
- 980126ArborText Announces XML Styler - a GUI editor for XSL stylesheets
- 980122 The W3C Working Group for XSL is formed
- 980112 Version 0.4beta of xslj is released
- 980107 A Technology Preview XSL Processor is released by Microsoft.
Learning XSL
There are already some tutorial materials on the current XSL specification.
- A short XSL Tutorial from Henry Thompson, given at SGML UK in October 1997
- A longer tutorial from Microsoft
- A white paper on XSL from Arbortext
Other XSL Resources include the XSL section on finetuning.com
XSL-Enabled Browsers
There are no native XSL-enabled browsers at this early stage.
However, several testbed implementations of XSL exist which can be used for experimentation, and which could be integrated into a browser.
- xslj, also from Henry Thompson, translates from XSL into extended DSSSL which can be understood by Jade, James Clark's DSSSL engine, which in turn can create formatted output using any of its back-end formatters (RTF, TeX, SGML, and HTML with CSS). Both the DSSSL and the HTML/CSS flow objects are supported; xslj is available with source code for the experimentally inclined.
- A Technology Preview XSL Processor is available both as a stand-alone processor and as an Active-X control, which allows XML date embedded in an HTML page to be rendered using XSL. The HTML/CSS flow objects are supported, but not the DSSSL ones; source is not provided.
- Docproc is an XSL processor written in Java. It uses a JavaScript-like language, Pnuts, instead of ECMAScript. Backends for HTML and for plain text are available; both DSSSL and HTML/CSS flow objects are supported and source is provided.
XSL-Enabled Authoring Tools
Only two weeks ago, I wrote:
It's early days yet. There are no shipping products although there have been announcements of future products. Who will be first?
And the answer was ...
980126ArborText Announces XML Styler - a GUI editor for XSL stylesheets
XSL Specification
XSL is currently defined by the initial proposal submitted to W3C. The XSL Working Group is working to refine and improve this specification and will produce a Working Draft for public comment in due course.
History of XSL
XSL draws on both DSSSL and CSS, (and DSSSL-O) so it inherits the history of those style sheet languages. And it uses ECMAScript, which was derived from JavaScript. More immediate history:
- 971113 Docproc, an XSL processor from Sean Russell, can be used as a standalone converter or as a servlet
- 970916 XSL submission is covered by Mark Walter of the Seybold Report on Internet Publishing
- 970911 XSL submission is acknowledged by W3C, published as a Note
- 970827 A Proposal for XSL is submitted to W3C
Frequently Asked Questions
- How is XSL different from CSS?
CSS is declarative and not user-extensible; XSL is primarily declarative, but is user-extensible using the ECMAScript language. XSL uses a XML notation, CSS uses its own. Aside from these technical differences, mature implementations of CSS1 and even of (parts of) CSS2 are available, whilst XSL is currently too new to have mature browser and content-authoring support.
- Will XSL replace CSS?
They are likely to co-exist since they meet different needs. XSL is intended for complex formatting where the content of the document might be displayed in multiple places; for example the text of a heading might also appear in a dynamically generated table of contents. CSS is intended for dynamic formatting of online documents for multiple media; its strictly declarative nature limits its capabilities but also makes it easy to generate and modify in the content-generation workflow.
- How is XSL different from DSSSL? From DSSSL-O?
DSSSL is an International Standard style sheet language. It is particularly used for formatting of print documents. DSSSL-O is a profile of DSSSL which removes some functionality and adds capabilities to make it more suited for online documentation. XSL draws on DSSSL and the DSSSL-O work and continues the trend towards a Web-oriented style sheet language by integrating experience with CSS.
- Will XSL replace DSSSL?
DSSSL has capabilities that XSL does not, and continues in use in the print publishing industry. Experience with XSL might be used in a future revision of DSSSL, but it is too early to say.
- So, CSS is for HTML and XSL is for XML?
CSS can be used with HTML and also with XML, provided that the XML document has a reasonably linear structure that can be displayed without extensive manipulation. XSL is targetted at XML, in particular highly-structured, data-rich documents that require extensive formatting.