p.step.example

Table of Contents

Syntax #

p.step.example

Purpose #

The p.step.example annotation is used to tag an element as being an example of a step. An example can contain multiple other elements, such as paragraphs, code, or preformatted text. This annotation is similar to p.step.info, but this annotation provides a clear, specific example of the procedure in question.

Examples #

The following is an example of a time where you might want to use the p.step.example annotation:

The following is an example of a rule that will apply p.step.example:

 

The following is the DITA XML output for the previous rule:

 

<step>

<cmd>Enter the code for your function.</cmd>

<stepxmp><p>For example:&#x2028;def sampleFunction(x, y):&#x2028;  z = x + y&#x2028;            print(&#x201c;The sum is &#x201c; + str(z))</p><p>For an example of a function without arguments:</p><codeblock>def sampleFunction():&#x2028;          print(&#x201c;This is a cool function&#x201d;)</codeblock></stepxmp>

</step>