PI: collect
The purpose is to collect fragments from other pages.
<?_wxt collect pages="" xpath=""?>
The parameters are:
pagepath (optional) | Identifies the pages we will collect from by an xpath which is applied on the script. For instance "//page" which means all pages in the script. No default. |
pages (optional) | Identifies the pages we will collect from. Pages may be identified by a comma-separated list. Each entry in the list may be a pagename or a (partial) path to the pages file. Each entry may have appendix "+" which indicates that all children of the page is included. Pages from an other group may be included with groupname# as prefix. No default. |
book (optional) | Identifies the pages we will collect from by attribute book. May be a commaseparated list of book-id's. Pages are identified across groups. No default. |
xpath (mandatory) | An xpath that identifies the fragments we want to collect from each of the selected pages. |
The three selection methods (book, pagepath, pages) may be combined, but a page is selcted only once.
A few examples using pagepath (remember that the path must select elements of type page):
<?_wxt collect pagepath="//group[@name='Group4']/page" xpath="//div[@id='collectable']"?> <?_wxt collect pagepath="//group[@name="Chapter2"]/descendant-or-self::page" xpath="//div[@class='collectable']"?> <?_wxt collect pagepath="//group[@name="Chapter2" or @name="Chapter3"]/descendant-or-self::page" xpath="//div[@class='collectable']"?>
A few examples using pages:
<?_wxt collect pages="A,pages/c.xml+,ref" xpath="//div[@class='collectable']/*" ?> <?_wxt collect pages="Group4#_all" xpath="//div[@class='collectable']"?>