SCSS Taking ZPT to the Next Level Problems/Complaints - ZPT is ugly - Designers still need to wade through code, and coders still need to wade through design (sometimes mucked up by tools or hands) - ZPT requires well-formed XHTML, which is less forgiving, not as supported by tools - Still a fundamental mixing of levels, structure and logic - ZPT requires the output to be SGML Solution Explicit separation of structural HTML and programmatic logic into different documents or document sections. Luckily, an existing standard already exists to separate structure and presentation, cascading style sheets. We can leverage this standard to implement a server-side style sheet that can be used to apply logical constructs to static, structural HTML much the same way that css applies presentation. CSS consists of a language and a rich set of rules for resolving the appropriate style to structure mapping based on nesting rules, classes and instance designations (ids). It also supports a form of multiple inheritance which allows you to layer style elements in extremely complex ways. An scss implementation would use these same rules to allow a more OO approach to template design. A given template could have any arbitrary number of server-side style sheets that would be combined using the standard cascading rules to resolve its logical behavior. Example At this time, the scss attributes are highly-speculative, and this example is just to illustrate some possible implementation of scss::
Today is: 2/5/02
This is the title
Id Title
Id Title
What's Left? I need to work out the mechanism for macro expansion if it is desired. I am currently leaning toward using insertion of separate objects as an alternative. A "macro collection" object, could conceivably be created to clump these together (ala DTML Template).