EchoPoint API - 3.0.0b5
App Webcontainer

echopoint.template.ui
Interface TemplateCompiler

All Known Implementing Classes:
JspXHTMLTemplateCompiler, XHTMLTemplateCompiler

public interface TemplateCompiler

TemplateCompiler are responsible for compiling template data into a XHTML DOM element, ready to be inserted into the rendering output.

A peer lookup mechanism is used to find the TemplateCompiler for a given content type. This is done via the TemplateCompilerLoader class.

The source data need not be in XHTML format however you must compile it into a XHTML DOM Element. For example you could right your own custom XML/XSLT implementation that produced XHTML.

The resultant XHTML DOM tree can have special marker Elements for component and string replacement.

<component name="xxx" style="xxx" /> markers will be replaced with the named component and a CSS style will be created for the style attribute and applied to the component.

<text name="xxx" /> markers will be replaced with the named string data.

See Also:
TemplateCompilerLoader

Method Summary
 Element compileTemplateDataIntoXHTML(Connection c, TemplateDataSource tds)
          This method is called to compile a template data source of template data into a DOM XHTML Element.
 String templateDataAsString(Connection c, TemplateDataSource tds)
           
 

Method Detail

compileTemplateDataIntoXHTML

Element compileTemplateDataIntoXHTML(Connection c,
                                     TemplateDataSource tds)
                                     throws Exception
This method is called to compile a template data source of template data into a DOM XHTML Element.

Parameters:
c - - the connection
tds - - the template data source
Returns:
a DOM Element in XHTML or null if it cant be compiled
Throws:
Exception - - can Throw exceptions such as parse exceptions etc..

templateDataAsString

String templateDataAsString(Connection c,
                            TemplateDataSource tds)
                            throws Exception
Throws:
Exception

EchoPoint API - 3.0.0b5
App Webcontainer