W3C | Submissions

Comment on the "Simple Tree Transformation Sheets 3" submission

W3C is pleased to receive the STTS3 submission from Electricité de France.

STTS3 is a language for describing transformations on HTML documents, in particular to add, delete and replace elements & attributes, and to add CSS style rules and properties to elements. It appears to be less suitable for large-scale reordering of a document's content. Its application to XML documents is expected in a future version.

It borrows most of its syntax from CSS, but, being a transformation language, rather than a style language, it has a different set of properties.

Its syntax is compatible with the so-called "forward-compatible syntax" of CSS, and its model of HTML documents is compatible with DOM level 1. This should make implementation and use of STTS3 relatively easy.

At the same time, STTS3 is sufficiently different from CSS that there is little danger that people will confuse the two, or try to mix them in one file.

One difference with CSS that might confuse users, is the fact that the order of the rules in an STTS3 transformation sheet is important, even of rules with different selectors. A CSS application would normally go through the document element by element and find the rules that apply, but an STTS3 application will go through the rules one by one and find the elements that apply. For example, an STTS3 transformation sheet can create an element in one rule, modify it in the next, and then delete it again in a third.

It uses CSS2's selectors, with some additions. Some of the additions might be considered by the CSS & FP WG for inclusion in CSS, but many of them cannot be added to CSS, because they require the full document to be present before processing starts. (CSS assumes progressive rendering, where the style of an element can be established before the next element has been read.)

The transformations STTS3 performs are similar, but probably more limited than those that XSL will support. However, the power of STTS3 and XSL is hard to compare, because of their different processing models: gradual transformation of the tree in the case of STTS3, vs depth-first, element-by-element tree building for XSL. Although the transformations STTS3 performs in each step are typically small, it can apply further transformations to the outcome of earlier steps.

From the examples in the submission, and in view of their different processing models, it seems that simple transformations, such as the addition or suppression of a single type of element, will be easier to express in STTS3 than in XSL. Transformations more complex than the insertion of a table of contents might well be easier in XSL.

The submitters already provide a free implementation of STTS2, and have promised an update to STTS3. The submission is therefore a useful tool in the tool box of Web authors and content providers. But STTS3's place seems to be mostly on the server side: allowing authors or Web server to clean-up or enhance HTML documents before they send them out. Adding CSS style rules to a document is especially easy with STTS3. Performing the transformation on the client-side seems less obvious, because of the progressive rendering issues.

Next steps

We will encourage the CSS & FP WG to look at the additions that STTS3 has made to CSS2's selector syntax.

Even though the techniques used by XSL and STTS3 are quite different, we will ask the XSL WG to spend some time on comparing the approaches, and gauging their relative power.

The HTML WG is currently looking into tools to help content providers with the conversion from HTML 4.0 and older to the next, XML-based version of HTML. STTS3 looks like it might be able to do many of the conversions, if the STTS3 implementation can be modified to output the transformed document in XML-compatible syntax.

W3C is organizing a workshop, for W3C members only, on query languages for structured documents (Boston, 3-4 Dec 1998). We encourage the submitters to present STTS3 there.

Disclaimer: placing a Submission on a Working Group agenda does not imply endorsement by either the W3C Staff or the participants of the Working Group, nor does it guarantee that the Working Group will agree to take any specific action on a Submission.

Bert Bos, <bert@w3.org>
$Date: 1998/11/13 09:31:44 $