Anne van Kesteren

We don't need STTS

Just kidding of course, STTS can be used for many things (when it is out), but I just learned about a new CSS3 property which is really, no I mean really cool!

The 'move-to' property can move element values into other elements. This is how the syntax looks like:

moved{
 move-to:insert;
}
insert{
 content:pending(insert);
}
<root>
  <moved>A</moved>
  1
  <insert/>
  2
  <moved>B</moved>
  3
  <insert/>
</root>

Gives: 1 A 2 3 B. Isn't that just great? With 'move-to' you specify an element which you can insert into another element using pending().

Comments

  1. Hmm, if a move-to property is allowed, then I would also like to have a copy-from property :)

    Posted by Martijn at

  2. What about a delete-from property then?

    I think all these CSS properties are a little over the top. CSS starts to influence structure directly. Adding content before or after is really useful, and in combination with the attr method it can be considered "styling an attribute". This, however, is plainly moving nodes as you like. The structure actually used in by your CSS gets cluttered, the CSS becomes hard to understand.

    Can someone give me an example where this is actually useful and can be considered styling something?

    Posted by Mark Wubben at

  3. Delete? What about content:'';?

    Posted by Anne at

  4. Should clarify this a bit:

    STTS (wrongly named STSS in the proposal) is a transformation language and not a presentation language (yes, exactly like XSLT) that operates according to the CSS3 syntax instead of according to XML and XPath syntaces. It's never been intended to extend css in any way, but rather to complement it. STTS does an actual transformation (changes the document structure), and the modified structure is then available for CSS to style, just like if you would have transformed the document using XSLT. (I think Glaz once made a comment that the xml-stylesheet PI is actually rather unsuited for XSLT or STTS, and that he would rather want a new xml-transformationsheet PI to handle them both...)

    Posted by liorean at

  5. Liorean: Anne already knows it is a transformation language :) Anyway: I'd rather use CSS to do simple transformations, instead of adding another stylesheet PI. When it comes to more advanced transformations I'll use XSLT. I don't think I will be using STTS, after having done a lot of study to understand XSLT. Other people will probably think XSLT is way to complicated, so they might rather choose STTS...

    Posted by Robbert Broersma at

  6. I know she knows. I was just pointing out that she should clarify it, because the writers of the first two comments seem to not have realised that.

    The PI was really a suggestion that relates to semantics. XSLT shouldn't be considered a stylesheet language, since it isn't. The purpose of STTS and XSLT is the same, so that PI should work for both. Using the xml-stylesheet PI for XSLT in the first place was a mistake, and XSL-FO is just a markup langauge like any other, is encoded in the structure of the document instead of in a styling language, so it isn't a stylesheet language either. No, DSSSL, CSS and JSSS are the only stylesheets languages (except for possible other proprietary stylesheet languages that I'm not aware of) that should be using the xml-stylesheet PI. Transformations should have their own PI, and I think bindings/behaviors, if such a language hits W3C or ISO or another web standards organisation, should have it's own PI too.

    Posted by liorean at

  7. FYI: It is he knows ;-)

    Posted by Anne at