PI: collect
The purpose of a collect is to produce
an XML-fragment that collects material from other modules.
The other modules, those we collect from, is built if necessary.
<?_wxt collect idlist="" books="" select="" xpath=""?>
The parameters are:
idlist (optional) |
A commaseparated list of module ids that we want to include.
If idlist is used, the others (select, root and book) are ignored.
|
root (optional) |
The id of the module that defines the subtree we will collect from.
|
books (optional) |
A commaseparated list of book ids that we want to include.
|
select (optional) |
Possible values are _siblings and _children.
Relative to the module that contains the collect PI.
|
scriptpath (optional) |
The scriptpath is an xpath that is used on the script to select modules.
Sample: //module[@template='P'] get all modules with template P.
|
xpath (mandatory) |
Defining what should be collected from each of
the selected modules.
|
The selected set of modules will be assembled according to the following rule:
- if idlist is set, the collection is as defined in the idlist.
- if idlist is not set, the collection is made up as the intersection
of the modules spesified by root, book, scriptpath and select.
- if neither idlist, root, book, scriptpath or select is set,
all modules are selected, except those with books attribute: _never.
Examples:
<div>
<?_wxt collect books="some" xpath="//h1"?>
</div>