EchoPoint API - 3.0.0b5
App Webcontainer

echopoint.template.ui
Class XHTMLTemplateCompiler

java.lang.Object
  extended by echopoint.template.ui.XHTMLTemplateCompiler
All Implemented Interfaces:
TemplateCompiler
Direct Known Subclasses:
JspXHTMLTemplateCompiler

public class XHTMLTemplateCompiler
extends Object
implements TemplateCompiler

XHTMLTemplateCompiler can compile source XHTML template data into.. well a XHTML DOM Element.


Constructor Summary
XHTMLTemplateCompiler()
           
 
Method Summary
protected static DocumentBuilder buildDocumentBuilder(TemplateCompilerHints compilerHints)
          Called to return a DocumentBuilder based on the compiler hints.
 Element compileTemplateDataIntoXHTML(Connection c, TemplateDataSource tds)
          This method is called to compile a template data source of template data into a DOM XHTML Element.
protected  Element compileXHTML(InputStream inputStream, TemplateDataSource tds)
          This does the actual compiling of a stream of XHTML into a XHTML DOM Element.
protected static DocumentBuilder getNonValidatingDocumentBuilder()
          Retrieves a thread-specific non validating DocumentBuilder.
 String templateDataAsString(Connection c, TemplateDataSource tds)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XHTMLTemplateCompiler

public XHTMLTemplateCompiler()
Method Detail

buildDocumentBuilder

protected static final DocumentBuilder buildDocumentBuilder(TemplateCompilerHints compilerHints)
Called to return a DocumentBuilder based on the compiler hints.

Parameters:
compilerHints - - the hints for the factory used to build the DocumentBuilder which can be null.
Returns:
a DocumentBuilder

getNonValidatingDocumentBuilder

protected static DocumentBuilder getNonValidatingDocumentBuilder()
Retrieves a thread-specific non validating DocumentBuilder.

Returns:
the DocumentBuilder serving the current thread.

compileTemplateDataIntoXHTML

public Element compileTemplateDataIntoXHTML(Connection c,
                                            TemplateDataSource tds)
                                     throws Exception
Description copied from interface: TemplateCompiler
This method is called to compile a template data source of template data into a DOM XHTML Element.

Specified by:
compileTemplateDataIntoXHTML in interface TemplateCompiler
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..
See Also:
echopoint.template.ui.TemplateCompiler#compileTemplateDataIntoXHTML(nextapp.echo.webcontainer.RenderContext, echopoint.template.TemplateDataSource)

templateDataAsString

public String templateDataAsString(Connection c,
                                   TemplateDataSource tds)
                            throws Exception
Specified by:
templateDataAsString in interface TemplateCompiler
Throws:
Exception

compileXHTML

protected Element compileXHTML(InputStream inputStream,
                               TemplateDataSource tds)
                        throws Exception
This does the actual compiling of a stream of XHTML into a XHTML DOM Element.

Parameters:
inputStream - - this must be a stream of XHTML data
tds - - -
Returns:
Throws:
Exception

EchoPoint API - 3.0.0b5
App Webcontainer