org.apache.fop.fo.expr
Class PropertyParser
org.apache.fop.fo.expr.PropertyTokenizer
|
+--org.apache.fop.fo.expr.PropertyParser
- public class PropertyParser
- extends PropertyTokenizer
Class to parse XSL FO property expression.
This class is heavily based on the epxression parser in James Clark's
XT, an XSLT processor.
Fields inherited from class org.apache.fop.fo.expr.PropertyTokenizer |
currentToken, currentTokenValue, TOK_COLORSPEC, TOK_COMMA, TOK_DIV, TOK_EOF, TOK_FLOAT, TOK_FUNCTION_LPAR, TOK_INTEGER, TOK_LITERAL, TOK_LPAR, TOK_MINUS, TOK_MOD, TOK_MULTIPLY, TOK_NCNAME, TOK_NUMBER, TOK_NUMERIC, TOK_PERCENT, TOK_PLUS, TOK_RPAR |
Method Summary |
static Property | parse(String expr, PropertyInfo propInfo) Public entrypoint to the Property expression parser. |
(package private) Property[] | parseArgs(int nbArgs) Parse a comma separated list of function arguments. |
parse
public static Property parse(String expr, PropertyInfo propInfo)
throws PropertyException
- Public entrypoint to the Property expression parser.
- Parameters:
- expr - The specified value (attribute on the xml element).
- propInfo - A PropertyInfo object representing the context in
which the property expression is to be evaluated.
- Returns: A Property object holding the parsed result.
- Throws:
- PropertyException - If the "expr" cannot be parsed as a Property.
parseArgs
Property[] parseArgs(int nbArgs)
throws PropertyException
- Parse a comma separated list of function arguments. Each argument
may itself be an expression. This method consumes the closing right
parenthesis of the argument list.
- Parameters:
- nbArgs - The number of arguments expected by the function.
- Returns: An array of Property objects representing the arguments
found.
- Throws:
- PropertyException - If the number of arguments found isn't equal
to the number expected.
to Class org.apache.fop.fo.expr.PropertyInfo
to Class java.lang.String
to Class org.apache.fop.fo.expr.Numeric
to Class java.util.Hashtable