EchoPoint API - 3.0.0b5
App Webcontainer

echopoint.template
Class SimpleTemplateCompilerHints

java.lang.Object
  extended by echopoint.template.SimpleTemplateCompilerHints
All Implemented Interfaces:
TemplateCompilerHints

public class SimpleTemplateCompilerHints
extends Object
implements TemplateCompilerHints

SimpleTemplateCompilerHints by default sets all boolean properties to false except for namespaceAware which is set to true. There are by default no custom attributes.

Some XML parses such as Xerces will automatically go to the Internet to get the XHTML DTD from the W3C if a DOCTYPE is specified in the template data, irrespective of whether validating is true or not. You can stop this on Xerces by setting a custom property as follows :

 setValidating(false);
 setAttributeValue("http://apache.org/xml/features/nonvalidating/load-external-dtd", Boolean.valueOf(false));
 


Constructor Summary
SimpleTemplateCompilerHints()
          Constructs a SimpleTemplateCompilerHints
 
Method Summary
 String[] getAttributeNames()
           
 Object getAttributeValue(String attributeName)
          Allows the system to retrieve specific attributes on the underlying XHTML parser implementation by attribute name.
 boolean isCoalescing()
           
 boolean isExpandEntityReferences()
           
 boolean isIgnoringComments()
           
 boolean isIgnoringElementContentWhitespace()
           
 boolean isNamespaceAware()
           
 boolean isValidating()
           
 void setAttributeValue(String attributeName, Object attributeValue)
          Sets an attribute value against a given attribute name
 void setCoalescing(boolean coalescing)
           
 void setExpandEntityReferences(boolean expandEntityReferences)
           
 void setIgnoringComments(boolean ignoringComments)
           
 void setIgnoringElementContentWhitespace(boolean ignoringElementContentWhitespace)
           
 void setNamespaceAware(boolean namespaceAware)
           
 void setValidating(boolean validating)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleTemplateCompilerHints

public SimpleTemplateCompilerHints()
Constructs a SimpleTemplateCompilerHints

Method Detail

getAttributeNames

public String[] getAttributeNames()
Specified by:
getAttributeNames in interface TemplateCompilerHints
Returns:
Allows the system to retrieve all the specific attributes to be set into the underlying XHTML parser implementation. if there are no attributes is should return a String[0] array as oppsoed to null.
See Also:
TemplateCompilerHints.getAttributeNames()

getAttributeValue

public Object getAttributeValue(String attributeName)
Description copied from interface: TemplateCompilerHints
Allows the system to retrieve specific attributes on the underlying XHTML parser implementation by attribute name. The name should have been provided in the getAttributeNames() method.

Specified by:
getAttributeValue in interface TemplateCompilerHints
Parameters:
attributeName - - the name of the specific attribute
Returns:
the value for that attribute name
See Also:
TemplateCompilerHints.getAttributeValue(java.lang.String)

isCoalescing

public boolean isCoalescing()
Specified by:
isCoalescing in interface TemplateCompilerHints
Returns:
Indicates whether or not the factory is configured to produce parsers which converts CDATA nodes to Text nodes and appends it to the adjacent (if any) Text node.
See Also:
TemplateCompilerHints.isCoalescing()

isExpandEntityReferences

public boolean isExpandEntityReferences()
Specified by:
isExpandEntityReferences in interface TemplateCompilerHints
Returns:
Indicates whether or not to use XHTML parsers which expand entity reference nodes.
See Also:
TemplateCompilerHints.isExpandEntityReferences()

isIgnoringComments

public boolean isIgnoringComments()
Specified by:
isIgnoringComments in interface TemplateCompilerHints
Returns:
Indicates whether or not to use XHTML parsers which ignores comments.
See Also:
TemplateCompilerHints.isIgnoringComments()

isIgnoringElementContentWhitespace

public boolean isIgnoringElementContentWhitespace()
Specified by:
isIgnoringElementContentWhitespace in interface TemplateCompilerHints
Returns:
Indicates whether or not to use XHTML parsers which ignore ignorable whitespace in element content.
See Also:
TemplateCompilerHints.isIgnoringElementContentWhitespace()

isNamespaceAware

public boolean isNamespaceAware()
Specified by:
isNamespaceAware in interface TemplateCompilerHints
Returns:
Indicates whether or not to use XHTML parsers which are namespace aware.
See Also:
TemplateCompilerHints.isNamespaceAware()

isValidating

public boolean isValidating()
Specified by:
isValidating in interface TemplateCompilerHints
Returns:
Indicates whether or not to use XHTML parsers which validate the XHTML content during parse.
See Also:
TemplateCompilerHints.isValidating()

setAttributeValue

public void setAttributeValue(String attributeName,
                              Object attributeValue)
Sets an attribute value against a given attribute name

Parameters:
attributeName - - the name of the attribute
attributeValue - - its value

setCoalescing

public void setCoalescing(boolean coalescing)
Parameters:
coalescing - The boolean value to set.
See Also:
TemplateCompilerHints.isCoalescing()

setExpandEntityReferences

public void setExpandEntityReferences(boolean expandEntityReferences)
Parameters:
expandEntityReferences - The boolean value to set.
See Also:
TemplateCompilerHints.isExpandEntityReferences()

setIgnoringComments

public void setIgnoringComments(boolean ignoringComments)
Parameters:
ignoringComments - The boolean value to set.
See Also:
TemplateCompilerHints.isIgnoringComments()

setIgnoringElementContentWhitespace

public void setIgnoringElementContentWhitespace(boolean ignoringElementContentWhitespace)
Parameters:
ignoringElementContentWhitespace - The boolean value to set.
See Also:
TemplateCompilerHints.isIgnoringElementContentWhitespace()

setNamespaceAware

public void setNamespaceAware(boolean namespaceAware)
Parameters:
namespaceAware - The boolean value to set.
See Also:
TemplateCompilerHints.isNamespaceAware()

setValidating

public void setValidating(boolean validating)
Parameters:
validating - The boolean value to set.
See Also:
TemplateCompilerHints.isValidating()

EchoPoint API - 3.0.0b5
App Webcontainer