Insert a Context
You can define a context to get the chapter titles of a requirement specification.
-
Create a parameter of requirement specification type and name it
ReqSpec.
For more information, see Adding Parameters to a Template.
-
Drag the To Specification Structure method from the
Outgoing Relationships folder of the
ReqSpec variable into the Graphical
area.
A loop on to specification structure appears and the associated iteration rel variable appears in the Data tab.
-
From the Structures list, drag the
Context element into the loop.
A context area is added to the template structure. The default context name is c.
-
To define the context, in the Properties tab:
-
Optional: Replace the default name of the context.
Important: Each context name must be unique. -
In the Parameter area, click
New.
A blank parameter with a default name p appears in the Parameters list and in the Data tab.
- Optional:
Replace the default name.
Important: Each parameter name must be unique. Note: You can change this name afterwards even if the parameter is used. For more information, see Renaming Template Elements. - In the Type box, select the type corresponding to the type to be exploited in the context element. In this scenario, select Specification Structure relationship.
- To create the association with the upper loop of this scenario, enter the iteration variable corresponding to the previous selected type in the Parameters area. In this scenario, enter rel for the parameter p.
-
Optional: Replace the default name of the context.
-
To define the content of your context based on the parameters of this context, drag
the To Chapter method from the Outgoing
Types folder of the p variable into the
context.
A loop on to chapter appears in the template. The associated iteration cha variable appears in the Data tab.
- From the Structures list, drag the Paragraph element into the loop.
- Drag the Title method from the Attributes folder of the cha variable into the paragraph.
The following context is created in the Graphical area: