NAME
Apache::AxKit::RayApp - Framework for logic and presentation separation
SYNOPSIS
SetHandler perl-script
AxConfigReader Apache::AxKit::RayApp
PerlHandler AxKit
DESCRIPTION
Under RayApp, the structure of application data is described in application.xml XML file, the application code is in application.plx Perl source code, and the resulting XML file with the data from the code execution is processed by XML transformation, preferrably by XSLT formatting.
The structure XML file has to describe the desired XML file that should be the result of the application run. The XML file has to include two special elements, data
and datalist
with attribute name
. These will be filled in by the data returned from the application Perl code.
The application Perl code has to be one or more functions. One of them has to be named handler
. The handler function is passed two parameters, Apache (the $r
) and Apache::Request (the $q
). The function should return a hash of values, which will be interpolated into the structure XML description.
The structure description file shall have one xml-stylesheet processing instruction which will be applied after the application code is run and the resulting data is interpolated to the XML stream.
CONFIGURATION in httpd.conf
You can control the behaviour of RayApp by following configuration directives:
- AxRayDebugLevel
-
PerlSetVar AxRayDebugLevel 7
Specifies the debug level for RayApp code. It overrides the AxDebugLevel value, if specified. If not specified, AxDebugLevel is used.
- AxRayDumpXML
-
PerlSetVar AxRayDumpXML 1
If set to 1, the XML data that is produced and passed among RayApp processing stages is printed to error_log. If not specified, the value of AxRayDebugLevel (or AxDebugLevel) is used, so setting AxRayDebugLevel to true gives you dumps of the data as well. You can switch this off explicitely by setting AxRayDumpXML to zero.
Only a true/false (1/0) value range is recognized.
- AxRayDbhConnect
-
PerlSetVar AxRayDbhConnect Project::DBI::Source
If this value is specified, RayApp will use that module and call connect method on it, in the example above it would be
$dbh = Project::DBI::Source->connect;
This DBI database handler is then passed as the third parameter to Perl application, to that handler subroutine.
- AxRayAppCharset
-
PerlSetVar AxRayDbhConnect ISO-8859-2
The application code may want to process and return data in other charset than the standard used internally by XML parsers, UTF-8. You can specify the character set either in the configuration file, or in the returned data as value of '!charset'.
- AxRayParamPropagate
-
PerlSetVar AxRayParamPropagate lang,su
Comma separated list of parameters that will be automatically added to every HTML link on the output page.
- AxRayReturnXML
-
PerlSetVar AxRayReturnXMLParam show_data
Name of parameter which will make RayApp to stop processing after the application data was fitted into the XML. In the query string, you need to give this parameter value 1, like
/application.xml?show_data=1
VERSION
0.43
AUTHOR
(c) 2000--2001 Jan Pazdziora, adelton@fi.muni.cz, http://www.fi.muni.cz/~adelton/ at Masaryk University, Brno, Czech Republic.