logo
WXT, a Web and Xml Tool
from Ostfold College
: Introduction > Documentation >The PIs

Processing Instructions, PI

Processing 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.

Some PI's are general and will work on any wellformed XML-file. Some is by their intention related to XHTML. Some of the latter are also XHTML-spesific in the sense that they introduce XHTML-elements into the page. Typically a table of content will introduce (X)HTML elements like a, div, span and even table.

The text in a _wxt PI is organized as name - value pairs, like attributes. This document use the term parameter. This example instructs WXT to import all div elements with attribute id main from myfile.xml:

<?_wxt import uri="myfile.xml" xpath="//div[@id='main']"?>

PI's may be dated, just like script elements, see dating. You can spesify a first and/or last date for a PI to be expanded. The dateform is yyyymmdd, or yyyy-mm-dd

<?_wxt import uri="myfile.xml" xpath="//div[@id='xmas']" firstdate="2005-12-24" lastdate"2006-01-01"?>

WXT, a Web and Xml Tool from Ostfold College: http://www.ia.hiof.no/~borres/wxtdoc/


Bygget med WXT : 11.jan.2009