Kaizou document structure
A Kaizou XML document is composed of:
- a set of descriptive tags similar to those used by RSS,
- a section describing the pages to which the Kaizou transformations shall be applied,
- several sections containing various actions to be applied on specific subsets of the document.
Descriptive tags
Several self-explainatory fields allow the specification of:
- the script
<title>, - the
<author>, - a web site(
<link>), - a
<description>.
Target section
A Kaizou target section is composed of:
- several uri, that are used by the browser to open a target page when the Kaizou format is embedded in an anchor link to form a Klink,
- several URL patterns used to select pages to which the Kaizou file applies when it is installed in the browser. The patterns can be expressed using wildcards represented by a ‘*’ character.
Below is a sample target section that specifically targets the english google homepage but can be applied on other google pages
<target>
<uri>http://www.google.com/en</uri>
<pattern>http://www.google.*</pattern>
</target>
Transform sections
A Kaizou transform section is composed of:
- a mandatory element that specifies the parts of the loaded page that shall be modified. This element uses the XPATH syntax,
- several actions to perform on the specified nodes.
Below is a sample Kaizou document, with a transform section that applies to all text nodes in a document and another one that applies to specific img nodes:
<kaizou xmlns="http://www.kaizou.org">
<title>Insert title here</title>
<author>Insert your name here</author>
<link>http://www.kaizou.org</link>
<description>Insert description here</description>
<target>
<uri>http://www.example.com</uri>
<pattern>http://www.example.*</pattern>
</target>
<transform>
<xpath>//text()</xpath>
…
</transform>
<transform>
<xpath>//img[contains(@src, ‘logo.gif’)]</xpath>
…
</transform>
</kaizou>