- XML (Extensible Markup Language) Reader/Writer
- XML Quick Facts
- Workbench XML Reader Parameters
- Workbench XML Writer Parameters
- Feature Representation
- Mapping File Reference
- xfMap
- Reading the Input XML Document
- Mapping Rules
- Types of Mapping Rules
- Match and Except Expression
- Specifying Several Match Expressions for One Mapping Rule
- Limiting Mapping Rule Activation with Except Expressions
- Mapping Rule States (activation, execution, suspension, and de-activation)
- Using Force Elements During Mapping Rule Activation and Deactivation
- Search-sets
- Expression Elements (Extract and Literal)
- Expression Sequence
- Feature Mapping Rules
- FME Feature Construction
- Feature Type Element
- Attributes Element
- FME Feature Construction (defining mapping rules under the <feature-content-map> element)
- Attribute Element (handling multiple values)
- Attribute Element (handling optional attributes)
- Attribute Element (sequenced attributes)
- Attribute Element (Nillable Attributes)
- Geometry Element
- Geometry Builder States (activation, execution, suspension, and de-activation)
- Geometry Construction
- Composite Geometry Builders
- Built-in Geometry Builders
- xml-point
- xml-point-xy
- xml-line
- xml-area
- xml-donut
- xml-aggregate
- xml-box
- xml-text
- xml-path
- xml-arc
- xml-arc-by-center-point
- xml-elliptical-arc
- xml-circle
- xml-polygon
- xml-face
- xml-composite-surface
- xml-triangulated-surface
- xml-enclosed-surface
- xml-composite-solid
- xml-multi-point
- xml-multi-curve
- xml-multi-area
- xml-multi-text
- xml-multi-surface
- xml-multi-solid
- xml-null
- xml-reverse-geometry
- xml-geodesic-string
- fme-geometry
- Mapping Segmented Geometric Information
- Geometry Traits (trait element)
- FME Feature Construction (constructing multiple features at a time)
- Structure Element
- References Element
- Apply References Element
- Group Mapping Rules
- Reference Mapping Rules
- Mapping Rules (Optional Elements)
- More Expression Elements
- FME Schema Features
- Reading the Input XML Document
Condition Element
Features that enter a group will also enter all its attribute sets and pipelines by default. Each attribute set and pipeline may contain an optional condition that allows an FME feature to enter it, or prevents and FME feature from entering it. The optional condition is represented in xfMap by the <condition> element:
<condition .../>
The <condition> element has two attributes named feature and element that take Boolean expressions as values. The feature attribute Boolean expression is evaluated on the attributes of the FME feature that entered the group. The element attribute Boolean expression is evaluated on the attribute of the element that matched the group mapping rule. At least one of the feature or element attributes must be present in the <condition> element. The following are the valid combinations:
<condition feature=”...”/>
<condition element=”...”/>
<condition feature=”...” element=”...”/>
The <condition> element also has an optional type attribute that specifies whether the feature and element Boolean expressions should form a conjunction or a disjunction. The valid values for the type attribute are and (for a conjunction), and or (for a disjunction). Its default value is and:
<condition feature=”...” type=”and” element=”...”/>
<condition feature=”...” type=”or” element=”...”/>
The grammar for both the feature and the element Boolean expressions is:
booleanExpr = attrCondition | andExpr | orExpr | ‘(‘ booleanExpr ‘)’ andExpr = booleanExpr ‘and’ booleanExpr orExpr = booleanExpr ‘or’ booleanExpr attrCondition = ‘@’attrName(‘+’ | ‘-’) | ‘@’attrName(‘=’|’!=’)’%’? (‘"‘|"‘")attrValue(‘"‘|"‘")
Note: Note: The XML Reader evaluates a Boolean expression in a right associative way. Use parentheses to indicate the intended precedence when using complex Boolean expressions.
Except for the % sign in the right-hand side of the attrCondition production, the grammar of the Boolean expression is identical to mapping rule’s match condition (see the section titled “mapping rules - the match expression”).
The % sign is used to access let variables inside the Boolean expression. Let variables are described in the section titled “mapping rules (optional elements) - define element”.