
The HTML output generated by the pulse web application framework is based on layout templates. We will introduce you the templates as they are used to generate the "demo layout" as it always comes by default with the current binary distribution of the framework.
The layout templates for pulse are written in XSLT (a declarative, XML-based language used for the transformation of XML documents into other XML documents such as XHTML).

The framework generates XML-output upon request which is then being transformed using XSL-templates to the resulting HTML-output. For a better understanding of the pulse framework you may also refer to the chapters of the documentation dealing with the configuration.
Before you start we highly recommend turning on the debug area. The debug area will
add the current XML-output which is being for the transformation to the bottom
of the page of the "demo layout". This can be done easily by changing the following
setting to true in "WEB-INF/xsl/globals.xsl":
<!-- debug area in demo layout --> <xsl:variable name="debug.site">false</xsl:variable>
The pulse demo from the binary release already comes with a basic layout implemented for demonstration and testing purposes. Therefore we tried to keep them rather simple. We will give a quick overview of how the templates are organised and where all the other layout specific resources are located. Most templates do contain further explanatory inline comments.
All the XSL-templates used for generating the demo layout are located in the following folders and their sub-folders:
All the other resources used for generating the demo layout are located in the following folders and their sub-folders:
Continue reading about components and bundles.
The main.xsl is the main point of entry for the transformation which generates the HTML-output. Besides the default templates it does include the main.xsl-templates of the used components (which provide the component-specific XSL-templates). Furthermore it defines the output-encoding.
The main.xsl builds the HTML-frame for the page to be generated by the transformation. It holds the side-bar and the footer of the demo-layout.
Via the main.xsl the follwing global resources are included:
The "WEB-INF/xsl/main.xsl" includes the following main and global XSL-templates:
The globals globals.xsl provides the following settings and global variables:
$locale", globally defines the current request-locale
xhtml.xsl" - used for tranforming XML to XHTML
For template localisation we use a concept we refer to as babelfish.xsl. The main idea behind the babelfish.xsl templates is to provide a set of re-usable XSL-templates, where localasations and other locale-specific templates can be easliy retrieved from by simply passing parameters. The localisation templates are usually located in ".../i18n/..."-folders within the ".../xsl/..."-folders.
The component-specific main XSL-templates - as located in "/WEB-INF/components/.../xsl/main.xsl" - do provide the global component-specifc XSL-templates as well as they include further comonent-specific XSL-templates for the demo-layout.