echopointng.ui.template
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
 org.w3c.dom.Element compileTemplateDataIntoXHTML(RenderContext rc, TemplateDataSource tds)
          This method is called to compile a template data source of template data into a DOM XHTML Element.
 

Method Detail

compileTemplateDataIntoXHTML

org.w3c.dom.Element compileTemplateDataIntoXHTML(RenderContext rc,
                                                 TemplateDataSource tds)
                                                 throws java.lang.Exception
This method is called to compile a template data source of template data into a DOM XHTML Element.

Parameters:
rc - - the RenderContext is play at the time of compilation
tds - - the template data source
Returns:
a DOM Element in XHTML or null if it cant be compiled
Throws:
java.lang.Exception - - can Throw exceptions such as parse exceptions etc..