<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/strict.dtd">
<html>
<!--#include file="sidebar_html.xps"-->
<!--#include file="rdf_html.xps"-->
<!--#include file="spacer.xps"-->
<%
$t->{'section'}{showtag} = 0;

$t->{'title'}{testcode} = sub {
	my ($node, $t) = @_;
	if ($node->getParentNode->getName eq 'section') {
		$t->{pre} = '<h1>';
		$t->{post} = '</h1>';
	}
	elsif ($node->getParentNode->getName eq 'subsection') {
		$t->{pre} = '<h2>';
		$t->{post} = '</h2>';
	}
	else {
		$t->{showtag} = 1;
	}
	return 1;
};

$t->{'ulink'}{testcode} = sub {
	my ($node, $t) = @_;
	my $url = $node->getAttribute('url');
	$t->{pre} = "<a href=\"$url\">";
	$t->{post} = "</a>";
	return 1;
};

$t->{'para'}{pre} = '<p>';
$t->{'para'}{post} = '</p>';

$t->{'emphasis'}{pre} = '<i>';
$t->{'emphasis'}{post} = '</i>';

%>
<head>
<title><%= findvalue('/webpage/head/title/text()') %></title>
<meta name="Author" content="Matt Sergeant" />
<link rel="stylesheet" href="/stylesheets/axkit.css" type="text/css" />
</head>

<!--#include file="body_tag_html.xps"-->

<!-- navbar and content positioning table -->


<table width="100%" border='0' cellspacing='0' cellpadding='0'>
<tr>
<!-- navbar -->
<td align="left" valign="top" width='172'>

<!--#include file="navbar_html.xps"-->

</td>

<!-- whitespace -->
<td align="left" valign="top" width="10"><%= spacer(10,1) %></td>

<!-- content -->
<td align="left" valign="top">

    <table width="100%" border="0" cellspacing="5" cellpadding="0">

    <!-- toponomic marker -->
    <tr>
    <td align="left" valign="top">
    <span class="toponomic">
<a href="http://axkit.org/">http://axkit.org/</a>
::
<%
{
my $uri = $r->uri;
$uri =~ s/^\///;
my ($file) = $uri =~ /([^\/]+)$/;
$uri =~ s/\Q$file\E$//;
my $local = '';
foreach my $part (split('/', $uri)) {
	$local .= "/$part/index.xml";
	my $title = findvalue("document('$local')/descendant::title[1]");
	if ($title eq 'Index') {
		print $part, " :: ";
	}
	else {
		print "<a href=\"$local\">", $title, "</a> :: ";
	}
	$local =~ s/\/index\.xml$//;
}
if ($file ne 'index.xml') {
	my $location = "/$file";
	$location = "/$uri$file" if $uri;
	print "<a href=\"$location\">", findvalue("document('$location')/descendant::title[1]"), "</a> :: ";
}
}
%>
	</span>
    </td>
    </tr>

    <!-- line -->
    <tr>
    <td bgcolor="#660099" style="line-height: 0;"><%= spacer(20,1) %></td>
    </tr>

    <tr>
    <td align="left" valign="top">

        <table width="100%" border="0" cellspacing="5" cellpadding="0">
        <tr>

        <!-- main text -->
        <td align="left" valign="top">
		<%= apply_templates('/webpage/body/*') %>
		</td>
		
		<%
		if ($r->uri eq '/index.xml') {
		%>
		<td align="left" valign="top" width="170">
                <%= apply_templates('document("news.xml")') %>
		</td>
		<% } %>
        </tr>
        </table>

    </td>
    </tr>

    <!-- line -->
    <tr>
    <td bgcolor="#660099" style="line-height: 0;"><%= spacer(20,1) %></td>
    </tr>


    <!-- copyright -->
    <tr>
    <td align="left" valign="top">
    <span class="copyright">These pages are copyright &copy; 2000 AxKit.com Ltd</span>
    </td>
    </tr>



    </table>


</td>

<!-- whitespace -->
<td align="left" valign="top" width="10"><%= spacer(10,1) %></td>

</tr>
</table>

</body>
</html>
