Name/value pairs are used in the
NESTED and ENTRY attributes to specify filters that determine which
nested packages and entries are to be involved in a substitution operation.
You must quote the name/value pair and contain it within parentheses.
For example,
$(nested="(type=report)" entry="(a=b)")
When the name/value
pair is specified outside the
<SASREPEAT> tags, only the first entry that matches the filter is substituted.
When the name/value pair is used inside the <SASREPEAT> tags,
all entries that match the filter are substituted into the HTML or
text output.
To limit the search
for an entry to the main package only, omit the NESTED attribute.
For example,
$(entry="(type=report)")
specifies
that the entry that is to be involved in the substitution operation
is the first entry in the main package that has a name/value pair
of type=report.
Entries in the main
package are always candidates for name/value substitution, even when
the NESTED attribute is specified. In the following example, the entry
that is involved in the substitution is either the first entry in
the main package that matches the a=b name/value pair or it is the
first entry that matches a=b in the first nested package with the
type=report name/value pair.
$(nested="(type=report)" entry="(a=b)")
To substitute all entries
that match the name/value pairs, enclose the substitution within
the
<SASREPEAT> tag. If the preceding example were enclosed in <SASREPEAT>
tags, the entries that are involved in the substitution would be all
those in the main package and the nested packages that match the
a=b name/value pair.
The name/value syntax
also supports the asterisk (*) wildcard on the NESTED attribute. The
asterisk indicates "all levels below." For example, to substitute
"all entries in all nested packages beneath this level," use a period
(.) and an asterisk (*) in the NESTED attribute, as follows:
$(nested="(type=report).*" entry="(a=b)")
The preceding example
identifies for the substitution all entries that match the a=b name/value
pair in the following packages:
-
-
the first nested package that contains
a match of the type=report name/value pair, regardless of the nesting
level of that package
-
any package, regardless of name/value
pair, that is nested beneath the first nested package
To substitute all matching
entries in the main package and in all nested packages, use an asterisk
in the NESTED attribute, as shown in the following example:
$(nested="*" entry="(a=b)")
The preceding example
substitutes all entries in the main package and in all nested packages
at any level that match the name/value pair a=b.