home     documentation     download     Spyce logo

Documentation - Language

Prev: 2 - Language Up: 2 - Language Next: 2.2 - Spyce Comments

2.1. Plain HTML and Active Tags

Static plain HTML strings are printed as they are encountered. Depending on the compacting mode of the Spyce compiler, some whitespace may be eliminated. The Spyce transform module, for example, may further pre-processes this string, by inserting transformations into the output pipe. This is useful, for example, for dynamic compression of the script result.

The Spyce language supports tag libraries. Once a tag library is imported under some name, mytags, then all static HTML tags of the form <mytags:foo ... > become "active". That is, code from the tag library is executed at that point in the document. Tags can control their output, conditionally skip or loop the execution of their bodies, and can interact with other active tags in the document. They are similar, in spirit and functionality, to JSP tags. Tag libraries and modules (discussed later) can both considerably reduce the amount of code on a Spyce page, and increase code reuse and modularity.

Prev: 2 - Language Up: 2 - Language Next: 2.2 - Spyce Comments

Spyce logo
Python Server Pages
version 2.1.3
Spyce Powered SourceForge Logo