The top-level element of a rule specifies the axis along which the primary tests for an action will be applied. Two axes are available: the self axis and the parent axis, specified respectively by the <self> and <parent> elements. The content model of these elements is indicated below. All children are optional and may occur only once, unless otherwise specified. Elements must occur in the order indicated:
The <element> tag tests the node on either the self or parent axis. Actions are only performed for the specified element or pseudoelement. Additional tests may be specified with <ignore-before>, <ignore-after>, and <ignore-in-parent>. Actions may be specified with <render-before>, <render-after>, <apply-filter>, <style>, and <style-extra>. The <if> element, which may only occur under <self>, and which may be repeated any number of times, allows for another method of specifying conditional actions.