Further Customizing Dynamic Documents
So far, this example doesn’t do much other than generate the standard style sheet for the document in question. Still, on a large project that might have dozens of style sheets, that alone might be a large benefit. However, once you automatically generate the style sheet, there are many customizations you might make.
For example, consider this portion of the style-sheet–generation code:
if element.getAttribute(“ref”) = “headline” then cssStyle = “BoxCopy” else cssStyle = element.getAttribute(“ref”) end if
Here, the headline element gets a special style (BoxCopy). Of course, you could simply make a style sheet entry for the headline type and omit this special processing. But what if you wanted to selectively ...
Get Special Edition Using XSLT now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.