W3C Recommends XSL
An Anonymous Coward writes: "The W3C upgraded
XSL 1.0
to the status of a recomendation today, as they reported in
a press release." From that release: "XSLT 1.0 makes it possible to significantly change the original structure of an XML document (automatic generation of tables of contents, cross-references, indexes, etc.), while XSL 1.0 makes complex document formatting possible through the use of formatting objects and properties."
After having used XSLT about a dozen times, I gave up. I had DSSSL expreience before, so I thought that it would be similar and that I could transfer some of my experience over. I felt like I was more productive in yacc or Antlr for quick projects and for anything that started to become more complex, I felt that the XSLT transformation definition complexity grew polynomially. For very large projects (more than a hundred million element, blame someone else for choosing XML for this, not me) I couldn't find a transformer that worked, even though I made sure that the DTD was regular (not context free).
I thought that the original goal was to make a _simple_ declarative language that handled 80% of the transformations easily and left the other 20% to something else (like using a real language). Even the simplest tasks require too much code in my opinion. My first XSLT project, a learning project, was to write the game of life, as it is with every new tool. I have two versions, the shortest being 150 lines that required the field to be an ugly composition of <o/> and <X/> elements.
There is a very high syntax to semantics ratio. Similar operations require different syntax, such as inserting an element can be done literally, but inserting an attribute requires special instructions (a minimum of 2 elements). There is no continuity in the different ways to reference a variable binding. You use templates to generate the structure of the XML but cannot generate text structure in a similar way, neither content data or attribute value data. Blah blah blah... I could go on. It seems like they ended up with a complex framework without strong expressive power. Why couldn't they just do DSSSL with the XML syntax if they wanted it?
Besides, for me it is difficult to look at with XSLT definitions/commands, obviously in XML, sprinkled around output literal XML elements. But I haven't trained my XSLT syntax eye too extensively. It is probably the same way people feel about looking at my DSSSL code.
p.s., I think they lie when they say it is side effect free and completely declarative.
-j