org.millscript.millscript.loaders
Class TemplateLoader
java.lang.Object
org.millscript.millscript.loaders.Loader
org.millscript.millscript.loaders.ValueLoader
org.millscript.millscript.loaders.ExprLoader
org.millscript.millscript.loaders.BasicTemplateLoader
org.millscript.millscript.loaders.BasicXHTMLTemplateLoader
org.millscript.millscript.loaders.TemplateLoader
- All Implemented Interfaces:
- org.millscript.commons.alert.AlertOrigin
public final class TemplateLoader
- extends BasicXHTMLTemplateLoader
This class implements the MillScript template loader. The specified file is
loaded as an XHTML file, but the additional elements arg and
item and attribute values starting with ? take on
special meaning.
|
Constructor Summary |
TemplateLoader()
Constructs a new XHTML template loader which does not support XML
namespaces, with the default set of special elements. |
|
Method Summary |
Expr |
compAttributeValue(java.lang.String value)
Returns the compiled attribute value. |
void |
compileEndTag(org.millscript.commons.xml.api.token.EndTagToken token)
Performs any required steps to compile the specified end tag. |
void |
compileStartTag(org.millscript.commons.xml.api.token.StartTagToken token)
Performs any required steps to compile the specified start tag. |
Expr |
makeLambda(java.lang.String theName,
Expr body)
Returns a lambda expression for the specified name and body. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TemplateLoader
public TemplateLoader()
- Constructs a new XHTML template loader which does not support XML
namespaces, with the default set of special elements.
compAttributeValue
public Expr compAttributeValue(java.lang.String value)
- Description copied from class:
BasicTemplateLoader
- Returns the compiled attribute value.
- Specified by:
compAttributeValue in class BasicTemplateLoader
- Parameters:
value - attribute value
- Returns:
- an Expr compiled from the specified attribute value
- See Also:
BasicTemplateLoader.compAttributeValue(java.lang.String)
compileEndTag
public void compileEndTag(org.millscript.commons.xml.api.token.EndTagToken token)
- Description copied from class:
BasicTemplateLoader
- Performs any required steps to compile the specified end tag.
- Overrides:
compileEndTag in class BasicTemplateLoader
- Parameters:
token - the end tag token to compile- See Also:
BasicTemplateLoader.compileEndTag(org.millscript.commons.xml.api.token.EndTagToken)
compileStartTag
public void compileStartTag(org.millscript.commons.xml.api.token.StartTagToken token)
- Description copied from class:
BasicTemplateLoader
- Performs any required steps to compile the specified start tag.
- Overrides:
compileStartTag in class BasicXHTMLTemplateLoader
- Parameters:
token - the start tag token to compile- See Also:
BasicTemplateLoader.compileStartTag(org.millscript.commons.xml.api.token.StartTagToken)
makeLambda
public Expr makeLambda(java.lang.String theName,
Expr body)
- Description copied from class:
BasicTemplateLoader
- Returns a lambda expression for the specified name and body.
- Specified by:
makeLambda in class BasicTemplateLoader
- Parameters:
theName - the name for lambda expressionbody - the body expression for the lambda expression
- Returns:
- an Expr
- See Also:
BasicTemplateLoader.makeLambda(java.lang.String, org.millscript.millscript.expr.Expr)
Copyright © 2001-2007 Open World Ltd. All Rights Reserved.