Generating Style Sheets Dynamically
By Michael Floyd
When I envision an XML development team, I picture several people with different skill sets. For example, an information architect, or what we may once have called a "knowledge engineer," possesses the background and aptitude for designing and implementing document structure. That's the DTD or schema developer. Distinctly different is the software engineer who uses APIs like SAX or the Document Object Model (DOM) to access and process documents programmatically. And then there's a transformation specialist. This is, in my mind, someone who uses the XSL Transformation language (XSLT) to convert, translate, and transform XML into other formats, often for the purpose of data exchange with other systems.
The problem arises because this last person, or more importantly his or her skill set, isn't very well understood. Most managers push these responsibilities onto their user-interface designers. After all, these are style sheets, right? Well, yes we call them style sheets, but they bear little resemblance to the Cascading Style Sheets (CSS) that many managers associate with them. In fact, XSLT is a verbose language with far more complexity than the relatively straightforward DOM. Though not a programming language, XSLT includes features that let you walk document trees, create, access, and modify individual nodes, perform iterative and conditional processing, and much more. Thus, XSLT can be equated to a declarative programming language that uses XML syntax.
It's this misconception that XSL is a formatting mechanism that causes XSL in general, and XSLT in particular, to be overlooked.