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):
If no escape-curly-brace occurs, one single
Otherwise one(1)
[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 escape-curly-brace occurs, one single
TPath.Literal
is returned.Otherwise one(1)
TPath.FunctionCall
to "string()" or to "concat()", on many of
these both.-
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 Stringbuilder "konst" or call 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 Stringbuilder "konst" or call tpath parser. The results of both variants are zipped into "result" and at last combined in a call to string-concat, iff necessary. -
main
-