Include directive |
Bill Use the Include directive to instruct stream processing to insert one text within another text. This lets you define a commonly used segment of HTML or XML text once and then incorporate it where needed.
The include JavaServer Page tag provides a functionally identical capability for JSP-based stream rules. See JSP Tags — include.
This directive is useful in source HTML text for user interface forms and displays, in source HTML text for correspondence, and in XML text for interfaces.
Use the Include directive to include any of six rule types:
This example inserts a part into the currently processed stream:
03-02 R-5711 The Include directive can reference a rule that does not yet exist. At runtime, the referenced rule must exist.
Use the Rules Inspector tool to identify the class and name of included parts.
In the syntax presentations below:
[
and ]
define optional parts of the directive. Do not type the
brackets.{
and }
mark
the start and end of the directive.{INCLUDE [stream rule class or keyword] = name of the included part [. correspondence or XML qualifier]}
All text inside the brace characters is case-insensitive.
If the stream rule class is Rule-Obj-Corr, use a period and the correspondence type (Rule-CorrType name) as the correspondence qualifier to identify two key parts of a correspondence rule. For example, the standard correspondence type email can appear:
INCLUDE Rule-Obj-Corr = SuccessCorr.email
Similarly, if the stream rule class is Rule-Obj-XML, use a period to separate the second and third key parts of the target XML Stream rule. For example,
INCLUDE Rule-Obj-XML = Contact.MapFrom
If you omit the stream rule type or keyword before the equal sign, the system assumes a rule type that depends on the class of the current rule:
In a rule of this rule type: |
The default stream rule type is: |
Rule-HTML-Property |
Rule-HTML-Property |
Rule-Obj-HTML |
Rule-HTML-Fragment |
Rule-Obj-Corr |
Rule-Corr-Fragment |
Rule-Corr-Fragment |
Rule-Corr-Fragment |
Rule-Obj-XML |
Rule-Obj-XML |
Use these keywords before the equal sign to use a value other than the default, or enter a rule type:
Keyword |
Meaning |
|
Rule-Obj-HTML, or the rule type specified. |
|
Rule-Obj-HTML, Rule-Obj-Corr, or Rule-Obj-XML, depending on the rule type of the current rule. |
|
Same as
Standard . |
|
Rule-Obj-HTML with all input disabled. |
|
Rule-HTML-Fragment or Rule-Corr-Fragment, depending on the type of the current rule. |
|
Rule-HTML-Property. |
|
Rule-HTML-FixedList. (deprecated) |
You can embed one directive within the scope of another directive.
You can compute the argument to a directive at runtime, by concatenating values. Use the Reference directive to specify the values.
The Reference directive in this example uses the $SAVE
keyword to name a directive that was previously saved with the Save
directive.
{include {$save (includeSpecification)} }
The Reference directive in this example evaluates two other Reference directives to supply the values for class name and stream name.
{include '{myPage.pxStreamClass}={myPage.pxStreamName}'}
Directives