January 2002
Intermediate to advanced
480 pages
11h 5m
English
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 ...