Forum OpenACS Q&A: Response to Utility of XSLT?

Collapse
Posted by Richard Li on
The motivation behind the choice of XSLT in ACS Java 4.6 was driven by two perceived requirements: global styling and componentization. By global styling, I mean that we wanted to provide a way to consistently style an entire site or subsite by changing stylesheet rules in one place. Since the XSLT transforms in 4.6 are built hierarchically, changing the appearance of a subsite or the entire site generally requires you to modify one rule in a single place, rather than many rules in many places. (This also makes a site easier to upgrade, since customizations are isolated). Componentization was the idea that we wanted to build reusable widgets that could be plopped onto a page -- and look like it was part of the page. In other words, if the page had specific styling, or was part of a subsite that had subsite-specific styling, the component would automatically adopt the appearance of that page or subsite. You could do this, sort of, in the ACS 4 templating world. One issue that came up, though, was when you started to nest components: you would go crazy trying to make sure that the HTML would nest properly. By using XML as an abstraction layer, we avoid that problem. We're not sure yet that this is the solution of the future (tm). That's one reason why 4.6 provides full support for JSPs and regular ol' Javabeans. However, I think there are compelling benefits to using XSLT, but there are a number of challenges we'll have to meet in order to really make the system great (as some of the posts above clearly indicate).

I wonder if anyone (outside of aD, please) has had such experience, similar or otherwise?

Talli, as someone from aD, I was wondering if you could clarify what you mean by the "outside of aD, please" part 😊. Are you implying that the credibility of a poster on the merits of XSLT is suspect when s/he is from aD? I don't understand why you made this comment, since I feel that, even if you don't like the company that the person works for, a post (especially on a technical issue) should be discussed on its merits. Suppose, hypothetically, that I knew someone from Musea was posting nasty comments under a pseudonym. I wouldn't automatically stop reading all Musea posts because of that one person...