You are here: Popular Formats > XML (Extensible Markup Language) Reader/Writer > xfMap > Reading the Input XML Document > Specifying Several Match Expressions for One Mapping Rule

Specifying several match expressions for one mapping rule

A mapping rule can have more than onematch expression. The syntax for multiplematch expressionsin theelement’smatchattribute is:

(ancestorElement/)*element({index})?([booleanExpr])?
[(ancestorElement/)*element({index})?([booleanExpr])?]*

The match expressions are evaluated in order and a mapping ruleR matches an element Eif any of thematch expressionsin the mapping rulematcheselementE.

For example, consider the following rule XML file:

  255,0,0 0,255,0 0,0,255 255,165,0 255,140,0 255,192,203 165,42,42 245,245,220 

And the following mapping rule fragments:

  ...    ...    ...    ...