We saw declarative templates earlier in this appendix, in Section E.2. The $t hash is the key to declarative templates. The apply_templates( ) function iterates over the nodes of your XML file, applying the templates defined in the $t hash reference as it meets matching tags. This is the most important feature of XpathScript, because it allows you to define the appearance of individual tags without having to do your own iteration logic. We call this declarative templating.
The keys of $t are the names of the elements, including namespace prefixes where appropriate. When apply_templates( ) is called, XPathScript tries to find a member of $t that matches the element name.
The following subkeys define the transformation:
More details about XPathScript can be found on the AxKit web site, at http://attic.apache.org/projects/axkit.html/.