Package eu.bandm.tools.xslt.base
Class AttributeValueTemplate
java.lang.Object
eu.bandm.tools.xslt.base.AttributeValueTemplate
Parses an xslt "attribute value template" into an xpath expression
with explicit string operations. So the follwing are equivalent xslt
expressions (read [] for angle brackets):
[x:y z="a{{bc{def(g)}" /] ---> [x][xsl:attribute name="z" value="concat('a{bc', string(def(g))"][/x]Iff syntax errors occur, error messages are sent and null is returned. If no escaping-curly-brace occurs, one single
TPath.Literal
is returned.
Otherwise one(1) TPath.FunctionCall
to "string()" or to "concat()", on
multiple of these both.
Each instance is a one-usage-only parser.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final char
static final char
(package private) antlr.CharBuffer
static final String
static final String
(package private) StringBuilder
(package private) MessageCounter
(package private) MessageTee<SimpleMessage<XMLDocumentIdentifier>>
(package private) final List<TPath.Expr>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
static void
Accumulate constant character data in Stringbuilderkonst
or call a tpath parser.protected boolean
ATTENTION The "end element" semantic action at the end of the "braced expr" parsing method is fed into a sax event queue.
-
Field Details
-
brace_open
public static final char brace_open- See Also:
-
brace_close
public static final char brace_close- See Also:
-
fn_tostring
- See Also:
-
fn_concat
- See Also:
-
cb
antlr.CharBuffer cb -
konst
StringBuilder konst -
result
-
mcnt
MessageCounter mcnt -
msg
-
-
Constructor Details
-
AttributeValueTemplate
public AttributeValueTemplate()
-
-
Method Details
-
parse_tpath
protected boolean parse_tpath()ATTENTION The "end element" semantic action at the end of the "braced expr" parsing method is fed into a sax event queue. The "enqueue()" function therein calls the "getlinenumber()" callback. This triggers a "get token = LT()", which causes the consumption on the character stream, which must be un-done, because after the xantlr lexer the hand-written code must consume the next chars without any loss. -
flushBuffer
protected void flushBuffer() -
error
-
parse
Accumulate constant character data in Stringbuilderkonst
or call a tpath parser. Both operate on the sameCharBuffer
and share its read pointer. The results of both cases are zipped into "result" and finally combined in a call to tpath »string-concat()«, iff necessary. -
main
-