How to Delete an Element or Attribute

To delete an element or attribute from the current XSLT Map, the element or attribute must first exist in the XSLT. Nodes in the target tree that are not grayed, and not in italics, are nodes that exist in the XSLT. Nodes that are grayed, and in italics, are not part of the XSLT. Such grayed nodes represent candidate elements and attributes from the target schema, and cannot be deleted from the display.

To delete a target node that exists in the XSLT, do one of the following:

  • Click the target node to select it. Press the Delete key.

  • Right-click the target node and select Delete from the context menu that appears.

The node is removed from the XSLT and any mapping to the node is also removed. The deleted node is not removed from the display. The deleted node becomes gray and italicized indicating that it is now just a possible target node from the target schema, and is no longer part of the XSLT. However, if the deleted node was a duplicate node, or was in a position non-compliant with the target schema, then the node is removed from the display.

The following figure shows two comment nodes that are part of the XSLT map.

If you right-click the second Comment node and select Delete from the context menu, the duplicate node is removed from the XSLT and the display, as shown in the figure below.

Next, you right-click and remove the remaining Comment node. The node is not removed from the display, but is removed from the XSLT and its appearance changes to gray and italicized, as shown in the following figure.