- 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-clothoid
- 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
Limiting mapping rule activation with except expressions.
A mapping rule can have one or more except expression. The syntax for except expressions in the <mapping> element’s except attribute is identical to match expressions, i.e:
(ancestorElement/)*element([booleanExpr])?
[<whitespace>(ancestorElement/)*element([booleanExpr])?]*
The except expressions are evaluated in order and a mapping rule R fails to match an element E if any of the except expressions in the mapping rule matches element E.
For example, consider the following rule XML file and mapping rule fragments:
<?xml version="1.0"?> <family-tree> <grandparent> ...</grandparent> <grandparent> ...</grandparent> <grandparent> ...</grandparent> <grandparent> ...</grandparent> <parent> <name>Tristan Read</name> <gender>m</gender> <age>40</age> </parent> <parent> <name>Danielle Read</name> <gender>f</gender> <age>43</age> </parent> <child> <name>Grifffen Read</name> <gender>M</gender> <age>12</age> </child> <family-tree>
Then the following mapping rule would match only the children and parents:
<mapping match=”family-tree/*” except=”grandparent”> ...matches all family members except the grandparents </mapping>
This is quite useful when it is easier/briefer to define a match set negatively (everything but ...) rather than positively (the match is a, or b, or c, or d, ...).