定义元素

The元素允许expression sequences在其他人中被命名并引用expression sequencesthrough that name. It contains a sequence of one or more元素。每个element defines a让定义,的名称让定义通过了元素nameattribute while its value is anexpression sequence:

      ... 

这些Let表达序列可以以两种不同的方式访问:由此defnval expressions,or by the<条件>元素的布尔表达式%token. Thedefnval expressionis described indefnval Expressions。This section describes the%token in the<条件>元素的布尔表达式。

Recall that unlike the mapping rule’s match Boolean expression, the Boolean expressions from the<条件>元素可能包含额外的%token, which is reproduced for reference below.

booleanExpr = attrCondition | andExpr | orExpr | ‘(‘ booleanExpr ‘)’ andExpr = booleanExpr ‘and’ booleanExpr orExpr = booleanExpr ‘or’ booleanExpr attrCondition = ‘@’attrName(‘+’ | ‘-’) | ‘@’attrName(‘=’|’!=’)’%’? (‘"‘|"‘")attrValue(‘"‘|"‘")

The token%means to interpret theattrvalue.作为一个名字让定义。令定义的价值attrvalue., anexpression sequence然后被取代以进行比较。

The following example illustrates how the让定义smay be accessed through the<条件>元素的布尔表达式。

players.xml.

       Josephine 16   Joan 17  

We would like to map eachelement into an FME feature. We would also like to add a position attribute that describes the player’s position to the FME feature. Notice that all position information precedes the data of the individual players; therefore we’ll use组映射规则:

Players.xmp.