See also Install
Style Code
Apache Style Modules
Install Apache2 and mod_perl2 in your preferred Unix environment (tested on Debian, Ubuntu, Open Solaris and Mac OS X).
TODO: Babe bones Apache2 and mod_perl2 installation and configuration for Zaltana.
Install these perl dependencies (package name followed by debian/ubuntu/nexenta package name for apt-get install command).
- Module::Build - libmodule-build-perl
- Apache2::Request - libapache2-request-perl
- XML::LibXSLT - libxml-libxslt-perl
TODO: Get full list of dependencies here.
NOTE: Most of the test cases currently fail due to the need for a complex apache environment for testing - working on a fix to this using the same structure as mod_perl does for testing.
Download (SVN checkout) and install Zaltana-Style apache filter.
svn co http://www.zaltana.org/project/zaltana/Zaltana-Style/trunk Zaltana-Style cd Zaltana-Style perl Build.PL ./Build install
Download and install some styles
NOTE: This is a large download due to the inclusion of TinyMCE GUI Editor which will be separated in a future release.
svn co http://www.zaltana.org/project/zaltana/Style-Core/trunk Style-Core cd Style-Core mkdir /var/www/z mkdir /var/www/z/style mkdir /var/www/z/style/core cp -R * /var/www/z/style/core/
Test the XSL is working (you may have to install xsltproc if not automatically installed with your LibXSLT - debian package = xsltproc).
xsltproc /var/www/z/style/core/xsl/style.xsl xsltproc --stringparam z_param_style_current core \ --stringparam configFile xyz --stringparam config xyz\ /var/www/z/style/core/xsl/style.xsl metadata.xhtml
The first command should just return no errors. The second should return an HTML page (the metadata.xhtml page is in the root of Style-Core).
Install further styles as required, changing the word "Core" to the alternative style name.
Configuration of Apache
Configure a directory in Apache to process styles. (in your apache config file)
PerlModule Zaltana::Style
<Location /test>
PerlOutputFilterHandler Zaltana::Style->filter
PerlSetVar Zaltana_Style_Default core
</Location>
Zaltana has many ways to choose which style to use. The above default set to core is only for testing.
Write a demonstration HTML
<?xml version="1.0"?>
<html xmlns="http://www.w3.org/2002/06/xhtml2">
<head>
<title>Zaltana Default</title>
</head>
<body>
<section id="page">
<section id="header">
<h1>Hello world</h1>
</section>
<section id="navigation">
<nl>
<li href="#">A menu entry</li>
<li href="#">Application
<nl>
<li href="#">Mail</li>
<li href="#">Wiki</li>
</nl>
</li>
<li href="#">Help</li>
</nl>
</section>
<section id="content">
<h>Table test</h>
<table class="data">
<thead>
<tr>
<th class="sort">First</th>
<th class="sort">Second</th>
</tr>
</thead>
<tbody>
<tr>
<td>A</td>
<td>3</td>
</tr>
<tr>
<td>C</td>
<td>5</td>
</tr>
<tr>
<td>B</td>
<td>4</td>
</tr>
<tr>
<td>D</td>
<td>2</td>
</tr>
</tbody>
</table>
</section>
</section>
<section id="footer">
<h1>Goodbye world</h1>
</section>
</section>
</body>
</html>
Reload apache, check logs and try page.
apache2ctl restart tail -f /var/log/apache2/*error.log
Go to http://localhost/test/filename.html - replace your URL and filename as appropriate here.
Troubleshooting module test
Undefined module - apreq blah
Load apreq into apache modules (you may need to install it)
a2enmod apreq
Authentication Code
TODO
Optional Apache Modules
TODO
