Example: Modifying the Mapping by Changing the XPath Expression

In this example, you modify the duplicate xsl:for-each statement to loop over the Item nodes under the LowPriorityItems node in the source document. There are several ways to modify the mappings. The following example discusses one way to modify the mappings.

If you edit the XPath expression associated with a for-each statement, all relative mappings under the for-each are automatically updated. Use the following steps to modify the XPath expression associated with the duplicate for-each statement:

  1. To edit the XPath expression, double-click the line connected to the second for-each. This is the blue line in Figure 41-25.

    The Edit XPath dialog appears. The XPath Expression field displays the XPath expression corresponding to the map.

  2. Change HighPriorityItems to LowPriorityItems in the XPath Expression. Click OK.

    The xsl:for-each statement and all its children now reference the LowPriorityItems/Item node-set.