Syntax-K

Know-How für Ihr Projekt

Perl Documentation

NAME

generic_transform - generic transformation of XML

SYNOPSIS

Plugin generic_transform
TransformParam design fancy
TransformParamQuery foo
TransformParamPerl foozle "$hd->param('foozle')"
TransformSkip "$_[1]->param('format') eq 'raw'"
Transformation XSLT(styles/foo.xsl,param=value) XSLT(styles/main.xsl) TAL(styles/global.html)

DESCRIPTION

This plugin allows you to configure generic transformation pipelines like they were common in AxKit1. These pipelines are always static.

CONFIGURATION

Transformation list

Specifies the transformation steps to be executed. <list> consists of white-space separated entries of the form METHOD(PARAM,ARGS), where METHOD is one of the known processors, like XSLT, XPathScript or TAL and PARAM is the stylesheet for that method. ARGS can be several NAME=VALUE pairs (possibly quoted) or a single parameter, depending on processor. If you use parameters of the form NAME~VALUE, the value will be evaluated at request time. One quite useful application is this:

Transformation XSLT(global.xsl,uri~'$hd->request_uri')

In evaluated Perl code, variable $client contains the current client object, and $hd contains the received headers object, including query parameters.

TransformParam name value

Add a constant parameter to all processors.

TransformParamQuery name

Pass a query parameter to all processors that take parameter pairs.

TransformParamPerl name expr

Pass a dynamically evaluated parameter to all processors that take parameter pairs. As above, $client and $hd are available.

TransformSkip expr

If the given expression returns a true value, the transformation is skipped entirely.