Processing InstructionsProcessing Instructions (PI) are legal XML elements. PIs have the general form: <?name ..any text interpreted by the interested program ...?> WXT has defined its own PIs which has the name _wxt. PIs may occur in template files and content files. Typically we embed PIs in the template to populate it with extracts from content. A PI may request something( an import, some xmlfragment etc), or it may produce something ( a referencelist, a Table of Content etc). WXT simply replaces the PI with this material. If it for some reason is not possible to do so, a report is given. The text in a _wxt PI is organized as name=value pairs, like attributes of an element. This document use the term parameter. This example instructs WXT to import the div element with attribute id main from myfile.xml: <?_wxt importxml location="myfile.xml" xpath="//div[@id='main']"?> The PI below will produce a modulemap with link to all modules which are children of the module that request the map: <?_wxt modulemap select="_children"?> PIs may be dated, just like script elements, see *Dating . You can specify a first and/or last date for a PI to be effective. The dateform is yyyy:mm:dd <?_wxt importxml location="myfile.xml" xpath="//div[@id='xmas']" firstdate="2005:12:24" lastdate"2006:01:01"?> Most PI's produce (X)HTML-fragments with style-classes. Usually a PI wraps it production in a tag (span or div) with a CSS class which is the same as the PI name prefixed with wxt. See Styles for information on styling. |