From: Peter Bernard West Date: Thu, 6 Mar 2003 05:07:14 +0000 (+0000) Subject: Using propertyExpressions.ehtml X-Git-Tag: Alt-Design-integration-base~81 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7754517049ecdf64fc38898f2d28c53232564602;p=xmlgraphics-fop.git Using propertyExpressions.ehtml git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196023 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/documentation/content/design/alt.design/properties/propertyExpressions.html b/src/documentation/content/design/alt.design/properties/propertyExpressions.html deleted file mode 100644 index e149feaa0..000000000 --- a/src/documentation/content/design/alt.design/properties/propertyExpressions.html +++ /dev/null @@ -1,453 +0,0 @@ - - - - - Property Expression Parsing - - - -
-

Property Expression Parsing

-

- by Peter B. West -

- - - -

Property expression parsing

-

- The parsing of property value expressions is handled by two - closely related classes: org.apache.fop.fo.expr.PropertyTokenizer - and its subclass, org.apache.fop.fo.expr.PropertyParser, - and by refineParsing(int, FONode, - PropertyValue) methods in the individual property - classes. PropertyTokenizer, as - the name suggests, handles the tokenizing of the expression, - handing tokens back to - its subclass, PropertyParser. PropertyParser, in turn, returns a PropertyValueList, a list of PropertyValues. -

-

- The tokenizer and parser rely in turn on the datatype - definitions from the org.apache.fop.datatypes package, - which include the PropertyValue datatype constant definitions. -

- -

Data types

-

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Numbers and lengths
Numeric - The fundamental length data type. Numerics of - various types are constructed by the classes listed - below. -
Constructor classes for Numeric
EmsRelative length in ems
IntegerType
LengthIn centimetres(cm), millimetres(mm), - inches(in), points(pt), picas(pc) or pixels(px)
Percentage
Other Numeric - Other numeric vaues which do not interact with the - lengths represented by Numeric values. -
AngleIn degrees(deg), gradients(grad) or - radians(rad)
FrequencyIn hertz(Hz) or kilohertz(kHz)
TimeIn seconds(s) or milliseconds(ms)
Strings
StringType - Base class for data types which result in a String. -
Literal - A subclass of StringType for literals which - exceed the constraints of an NCName. -
MimeType - A subclass of StringType for literals which - represent a mime type. -
UriType - A subclass of StringType for literals which - represent a URI, as specified by the argument to - url(). -
NCName - A subclass of StringType for literals which - meet the constraints of an NCName. -
CountryAn RFC 3066/ISO 3166 country code.
LanguageAn RFC 3066/ISO 639 language code.
ScriptAn ISO 15924 script code.
Enumerated types
EnumType - An integer representing one of the tokens in a set of - enumeration values. -
MappedNumeric - A subclass of EnumType. Maintains a - Numeric with the value to which the associated - "raw" enumeration token maps. E.g., the - font-size enumeration value "medium" maps to - the Numeric "12pt". -
Colors
ColorType - Maintains a four-element array of float, derived from - the name of a standard colour, the name returned by a - call to system-color(), or an RGB - specification. -
Fonts
FontFamilySet - Maintains an array of Strings containing a - prioritized list of possibly generic font family names. -
Pseudo-types
- A variety of pseudo-types have been defined as - convenience types for frequently appearing enumeration - token values, or for other special purposes. -
Inherit - For values of inherit. -
Auto - For values of auto. -
None - For values of none. -
Bool - For values of true/false. -
FromNearestSpecified - Created to ensure that, when associated with - a shorthand, the from-nearest-specified-value() - core function is the sole component of the expression. -
FromParent - Created to ensure that, when associated with - a shorthand, the from-parent() - core function is the sole component of the expression. -
- -

Tokenizer

-

- 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. -
- -
NONE
- -
- Similarly to AUTO, NONE has been promoted to a pseudo-type - because of its frequency. -
- -
BOOL
- -
- There is a de facto boolean type buried in the - enumeration types for many of the properties. It had been - specified as a type in its own right in this code. -
- -
MIMETYPE
- -
- 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 - case of a namespace prefix, and a MIMETYPE in the case of 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 - from the expressions of some properties. -

-

- - 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() - 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 - 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 - Functions.) -

-

- The experimental code is a simple extension of the existing - parser code, which itself borrowed heavily from James - Clark's XT processor. -

- -
- - - - - - - - - - -
- -