Condition元素

Features that enter a也将默认进入其所有的属性集和管道。每个属性组和流水线可以包含一个可选的条件,其允许FME功能来输入,或预防和FME特征侵入。可选的条件在xfMap由表示<条件>element:

The<条件>元素有一个名为两个属性featureelementthat take Boolean expressions as values. Thefeatureattribute Boolean expression is evaluated on the attributes of the FME feature that entered the group. Theelementattribute Boolean expression is evaluated on the attribute of the element that matched the组映射规则. At least one of thefeature要么element属性必须存在于<条件>元件。以下是有效的组合:





The<条件>element also has an optionaltypeattribute that specifies whether thefeatureelementBoolean expressions should form a conjunction or a disjunction. The valid values for thetypeattribute are(for a conjunction), and要么(对于析取)。它的默认值是:



The grammar for both thefeature和theelementBoolean 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 theattrConditionproduction, the grammar of the Boolean expression is identical tomapping rule’s match condition(see the section titled “mapping rules - the match expression”).

The%sign is used to access让变量inside the Boolean expression.Let variablesare described in the section titled “mapping rules (optional elements) - define element”。