public final class CFMLTransformer extends Object
EBNF (Extended Backus-Naur Form) transform = {body} body = [comment] ("" | "<" tag body | literal body); comment = ""} "--->"; literal = ("<" | {?-"#"-"<"} "<" | {"#" expression "#"} "<" ) | ({?-"<"} "<") (* Welcher Teil der "oder" Bedingung ausgefuehrt wird, ist abhaengig was die Tag-Lib vorgibt, dass Expression geparst werden sollen oder nicht. *) tag = name-space identifier spaces attributes ("/>" | ">" [body "" identifier spaces ">"]); (* Ob dem Tag ein Body und ein End-Tag folgt ist abhaengig von Definition des body-content in Tag-Lib, gleices gilt fuer appendix *) name-space = < tagLib[].getNameSpaceAndSeperator() >; (* Vergleicht Zeichen mit den Namespacedefinitionen der Tag Libraries. *) attributes = ({spaces attribute} "/>" | {spaces attribute} ">") | attribute-value; (* Welcher Teil der "oder" Bedingung ausgefuehrt wird, ist abhaengig von der Tag Attribute Definition in der Tag Lib. *) attribute = attribute-name spaces "=" spaces attribute-value; attribute-name = ("expression"|'expression'|expression) | identifier; (* Ruft identifier oder den Expression Transformer auf je nach Attribute Definition in der Tag Lib. *) attribute-value = expression; identifier = (letter | "_") {letter | "_"|digit}; letter = "a".."z"|"A".."Z"; digit = "0".."9"; expression =; (* Ruft den Expression Transformer auf. *) spaces = {space}; space = "\s"|"\t"|"\f"|"\t"|"\n"; {"x"}= 0 bis n mal "x" ["x"]= 0 bis 1 mal "x" ("x" | "y")"z" = "xz" oder "yz"
Modifier and Type | Field and Description |
---|---|
static short |
TAG_LIB_GLOBAL |
static short |
TAG_LIB_PAGE |
Constructor and Description |
---|
CFMLTransformer() |
Modifier and Type | Method and Description |
---|---|
static void |
attributes(TagData data,
TagLibTag tag,
Tag parent)
Liest die Attribute eines Tags ein, dies Abhaengig von der Definition innerhalb der Tag-Lib.
|
static Expression |
attributeValue(TagData data,
TagLibTag tag,
String type,
boolean parseExpression,
boolean isNonName,
Expression noExpression)
Liest den Wert eines Attribut, mithilfe des innerhalb der Tag-Lib definierten Expression Transformer, ein.
|
static boolean |
comment(CFMLString cfml) |
static TemplateException |
createTemplateException(CFMLString cfml,
String msg,
String detail,
TagLibTag tag) |
static TemplateException |
createTemplateException(CFMLString cfml,
String msg,
TagLibTag tag) |
static TagLibTag |
getTLT(CFMLString cfml,
String name) |
static String |
identifier(CFMLString cfml,
boolean throwError,
boolean allowColon)
Liest einen Identifier ein und gibt diesen als String zurueck.
|
static TagLib |
nameSpace(Data data)
Vergleicht folgende Zeichen mit den Namespacedefinitionen der Tag Libraries,
gibt eine Tag-Lib zurueck falls eine passt, ansonsten null.
|
static ApplicationException |
setAddional(ApplicationException ae,
TagLibTag tlt) |
static TemplateException |
setAddional(TemplateException te,
TagLibTag tlt) |
Page |
transform(ConfigImpl config,
CFMLString cfml,
TagLib[] tlibs,
FunctionLib[] flibs,
long sourceLastModified,
Boolean dotNotationUpperCase)
Startmethode zum transfomieren einer CFMLString.
|
Page |
transform(ConfigImpl config,
PageSource ps,
TagLib[] tlibs,
FunctionLib[] flibs)
Startmethode zum transfomieren einer CFML Datei.
|
public static short TAG_LIB_GLOBAL
public static short TAG_LIB_PAGE
public CFMLTransformer()
public Page transform(ConfigImpl config, PageSource ps, TagLib[] tlibs, FunctionLib[] flibs) throws TemplateException, IOException
{body}
config
- ps
- CFML Filetlibs
- Tag Library Deskriptoren, nach denen innerhalb der CFML Datei geprueft werden soll.flibs
- Function Library Deskriptoren, nach denen innerhalb der Expressions der CFML Datei geprueft werden soll.TemplateException
IOException
public static TagLibTag getTLT(CFMLString cfml, String name) throws TemplateException
TemplateException
public Page transform(ConfigImpl config, CFMLString cfml, TagLib[] tlibs, FunctionLib[] flibs, long sourceLastModified, Boolean dotNotationUpperCase) throws TemplateException
{body}
config
- cfml
- CFMLStringtlibs
- Tag Library Deskriptoren, nach denen innerhalb der CFML Datei geprueft werden soll.flibs
- Function Library Deskriptoren, nach denen innerhalb der Expressions der CFML Datei geprueft werden soll.sourceLastModified
- TemplateException
public static boolean comment(CFMLString cfml) throws TemplateException
TemplateException
public static TagLib nameSpace(Data data)
< tagLib[].getNameSpaceAndSeperator() >(* Vergleicht Zeichen mit den Namespacedefinitionen der Tag Libraries. *)
public static void attributes(TagData data, TagLibTag tag, Tag parent) throws TemplateException
({spaces attribute} "/>" | {spaces attribute} ">") | attribute-value;(* Welcher Teil der "oder" Bedingung ausgefuehrt wird, ist abhaengig von der Tag Attribute Definition in der Tag Lib. *)
tag
- parent
- TemplateException
public static Expression attributeValue(TagData data, TagLibTag tag, String type, boolean parseExpression, boolean isNonName, Expression noExpression) throws TemplateException
expression;
tag
- type
- parseExpression
- isNonName
- TemplateException
public static String identifier(CFMLString cfml, boolean throwError, boolean allowColon) throws TemplateException
(letter | "_") {letter | "_"|digit};
throwError
- throw error or return null if name is invalidTemplateException
public static TemplateException createTemplateException(CFMLString cfml, String msg, String detail, TagLibTag tag)
public static TemplateException createTemplateException(CFMLString cfml, String msg, TagLibTag tag)
public static TemplateException setAddional(TemplateException te, TagLibTag tlt)
public static ApplicationException setAddional(ApplicationException ae, TagLibTag tlt)
Copyright © 2015 Lucee