You can use the parseInt(attribute_or_variable_name) JavaScript expression to align attribute or variable values with numeric values starting with 1. Then, to create subheadings on child data, add one to the expression: parseInt(attribute_or_variable_name) + 1. This script expression allows the values to correspond incrementally to the heading styles in all of the Microsoft Word, PDF, and HTML outputs.
This example uses RequisitePro.xsd Generic XML schema, which includes the Level attribute in the PRRequirement query.
As the Level values increase by one, the heading styling increases by one as well. The Heading 1 style is set on the FullTag values for the requirements that have 0 as the Level value. The Heading 2 style is set on the FullTag values for the requirements that have 1 as the Level value.