From ce32e69a61ebbf18ad227c8db0afbde2b28554eb Mon Sep 17 00:00:00 2001 From: Peter Bernard West Date: Fri, 24 Jan 2003 03:23:31 +0000 Subject: [PATCH] Modified text and links. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@195883 13f79535-47bb-0310-9956-ffa450edef68 --- .../properties/propertyExpressions.html | 149 +++++++----------- 1 file changed, 54 insertions(+), 95 deletions(-) diff --git a/src/documentation/content/design/alt.design/properties/propertyExpressions.html b/src/documentation/content/design/alt.design/properties/propertyExpressions.html index ed85381a8..b619f2bfa 100644 --- a/src/documentation/content/design/alt.design/properties/propertyExpressions.html +++ b/src/documentation/content/design/alt.design/properties/propertyExpressions.html @@ -3,18 +3,7 @@ Property Expression Parsing - +
@@ -46,19 +35,19 @@ closely related classes: org.apache.fop.fo.expr.PropertyTokenizer + class= "codefrag" >org.apache.fop.fo.expr.PropertyTokenizer and its subclass, org.apache.fop.fo.expr.PropertyParser, + class= "codefrag" >org.apache.fop.fo.expr.PropertyParser, and by refineParsing(int, FONode, PropertyValue) methods in the individual property - classes. PropertyTokenizer, as + classes. PropertyTokenizer, as the name suggests, handles the tokenizing of the expression, handing tokens back to its subclass, PropertyParser. PropertyParser, in turn, returns a PropertyParser. PropertyParser, in turn, returns a PropertyValueList, a list of The tokenizer and parser rely in turn on the datatype definitions from the org.apache.fop.datatypes package, + class= "codefrag" >org.apache.fop.datatypes package, which include the PropertyValue datatype constant definitions. @@ -78,7 +67,7 @@

Data types

The data types currently defined in - org.apache.fop.datatypes include: + org.apache.fop.datatypes include:

@@ -236,13 +225,13 @@ - + @@ -334,57 +323,23 @@

Tokenizer

- The tokenizer returns one of the following token - values: -

-
-          static final int
-          EOF = 0
-          ,NCNAME = 1
-          ,MULTIPLY = 2
-          ,LPAR = 3
-          ,RPAR = 4
-          ,LITERAL = 5
-          ,FUNCTION_LPAR = 6
-          ,PLUS = 7
-          ,MINUS = 8
-          ,MOD = 9
-          ,DIV = 10
-          ,COMMA = 11
-          ,PERCENT = 12
-          ,COLORSPEC = 13
-          ,FLOAT = 14
-          ,INTEGER = 15
-          ,ABSOLUTE_LENGTH = 16
-          ,RELATIVE_LENGTH = 17
-          ,TIME = 18
-          ,FREQ = 19
-          ,ANGLE = 20
-          ,INHERIT = 21
-          ,AUTO = 22
-          ,NONE = 23
-          ,BOOL = 24
-          ,URI = 25
-          ,MIMETYPE = 26
-          // NO_UNIT is a transient token for internal use only.  It is
-          // never set as the end result of parsing a token.
-          ,NO_UNIT = 27
-          ;
-      
-

- Most of these tokens are self-explanatory, but a few need - further comment. + As mentioned above, the PropertyTokenizer hands tokens back to its subclass, PropertyParser. Most of these tokens are + self-explanatory, but a few need further comment.

AUTO
- Because of its frequency of occurrence, and the fact that - it is always the initial value for any property - which supports it, AUTO has been promoted into a - pseudo-type with its on datatype class. Therefore, it is - also reported as a token. + Because of its frequency of occurrence, and the fact that it + is always the initial value for any property which + supports it, AUTO has been promoted into a pseudo-type with + its on datatype class. Therefore, it is also reported as a + token.
NONE
@@ -405,54 +360,58 @@
MIMETYPE
- The property content-type + The property content-type introduces this complication. It can have two values of the form content-type:mime-type - (e.g. content-type="content-type:xml/svg") - or namespace-prefix:prefix - (e.g. content-type="namespace-prefix:svg"). - The experimental code reduces these options to the payload - in each case: an NCName in the + (e.g. content-type="content-type:xml/svg") or + namespace-prefix:prefix + (e.g. content-type="namespace-prefix:svg"). The + experimental code reduces these options to the payload in + each case: an NCName in the case of a namespace prefix, and a MIMETYPE in the case of a - content-type specification. NCNames cannot contain a "/". + content-type specification. NCNames cannot contain a "/".

Parser

- The parser returns a PropertyValueList, necessary because - of the possibility that a list of PropertyValue elements may be returned + The parser returns a PropertyValueList, necessary + because of the possibility that a list of PropertyValue elements may be returned from the expressions of some properties.

- PropertyValueLists may contain - PropertyValues or other PropertyValueLists. This latter - provision is necessitated for the peculiar case of of - text-shadow, which may contain whitespace separated - sublists of either two or three elements, separated from one - another by commas. To accommodate this peculiarity, comma - separated elements are added to the top-level list, while - whitespace separated values are always collected into sublists - to be added to the top-level list. + PropertyValueLists may contain + PropertyValues or other PropertyValueLists. This latter + provision is necessitated by some of the more peculiar + expression possibilities, e.g. font and + text-shadow. text-shadow may contain whitespace + separated sublists of either two or three elements, separated + from one another by commas. To accommodate this peculiarity, + comma separated elements are added to the top-level list, + while whitespace separated values are always collected into + sublists to be added to the top-level list.

Other special cases include the processing of the core - functions from-parent() and - from-nearest-specified-value() + functions from-parent() and + from-nearest-specified-value() when these function calls are assigned to a shorthand property, or used with a shorthand property name as an argument. In these cases, the function call must be the sole component of the expression. The pseudo-element classes FromParent and FromNearestSpecified are generated in + class= "codefrag" >FromParent and FromNearestSpecified are generated in these circumstances so that an exception will be thrown if they are involved in expression evaluation with other components. (See Rec. Section 5.10.4 Property Value -- 2.39.5

MappedEnumTypeMappedNumeric A subclass of EnumType. Maintains a - String with the value to which the associated + Numeric with the value to which the associated "raw" enumeration token maps. E.g., the font-size enumeration value "medium" maps to - the String "12pt". + the Numeric "12pt".