PI: import
The purpose of an import PI is to produce an XML-fragment and replace the PI with this fragment.
<?_wxt import xpath="" uri="" transformation=""?>
The parameters are:
xpath (mandatory) | Any xpath expression that identifies a nodeset that will be treated like a XML-fragment. |
uri (optional in templates) | The URI of the file we want to import from. In templates the uri parameter is usually skipped. In this case all content files listed in the script are searched for appropriate content. |
transformation (optional) | A transformation identifier (see: transformation-element) or a grouprelative or absolute location for a transformationfile. This transformation may have parameters. |
Some examples:
<?_wxt import xpath="//h1"?> <?_wxt import xpath="//div[@class='main']/*"?> <?_wxt import uri="http://www.ia.hiof.no/~borres/ml/index.shtml" xpath="//div[@class='main']/*"?> <?_wxt import uri="../quotes/q.xml" xpath="//p[@class='quot']/*"?> <?_wxt import xpath="//div[@id='main']" uri="b.xml" transformation="myT(para='hello',parb='goodbye')"?>