- Parameters:
Parameter | Description | Default |
query | The XPath query to perform on the data store (see below). | none, required parameter |
aggregate | If 0, apply "format" to each matching XML node. See below. | 1 |
atomempty | If 1, insert the empty value for individual (atomic) XPath subexpressions in format that have no results. | 0 |
separator | Specifies text to insert between each record of formatted output. | $n() (newline) |
newline | Text to insert in the output, if aggregate is 1, between aggregated matches. | <br/> |
format | Specifies the output format using an XPath expression. | none |
header | Specifies text to insert at the top of formatted output. | none |
footer | Specifies text to insert at the bottom of formatted output. | none |
empty | Text to insert into formatted output if an XPath expression matches nothing. | |
zeroresults | Text to display if there are no matches to the query expression. | No results.$n |
label | Indicate how wiki links are labeled, with the Entity id, spec, aspec (abbreviated spec) or topic | name |
The
query option is where half the utility of this macro resides. Use this option to specify an
XPath query that will match XML nodes in the data store that are of interest. Example:
/datacrossref/data[@deprecated='1' and @web='Extensions']
See
DataFlowDiaPluginFormatting for details on formatted text output.
Some noteworthy comments:
- All entity nodes have an @id, @name, @web, @topic and @defined attribute.
- Entities other than group may have group child nodes.
- As a work-around for the fact that XPath 1.0 does not support querying node names, all nodes for searching have a @nodename attribute.
- Aside: The nodename() function is supported by XPath 2.0 but libxml2 does not and apparently will not support XPath 2.0. DataFlowDiaPlugin is developed using a Perl wrapper for libxml2.
- Cross references defined in DFD macros are typically accessible to DFDSEARCH using the singular (non-plural) form of the name, e.g. inputs becomes multiple XML nodes called input.