<!--#include file="sidebar_html.xps"-->
<!--#include file="rdf_html.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>';

sub spacer {
	my ($width, $height, $align) = @_;
	return "<img src='/img/pix.gif' 
	width='$width' height='$height'" . ($align ? " align='$align'" : '') .
 " border='0' vspace='0' hspace='0' 
	alt=''>";
}

%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<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>

<body 
bgcolor='#ffffff' text='#333333' link='#9966cc' vlink='#330066' alink='#eeddff' 
marginheight='0' marginwidth='0' 
topmargin='0' leftmargin='0' background='/img/bg.gif'>


<!-- banner table -->


<table width='100%' border='0' cellspacing='0' cellpadding='0'>

<tr style='line-height: 0;'>
<td align='left' valign='top' width='352' background='/img/banner_bg.gif'><img
	src='/img/banner2.gif' width='352' height='84' border='0' vspace='0' hspace='0' alt='AxKit.org [logo curtesy of http://xml.com]' /></td>


<td align='right' valign='top' width='100%' background='/img/banner_bg.gif'><img
	src='/img/banner_end.gif' width='26' height='84' border='0' vspace='0' hspace='0' alt='' /></td>
</tr>
</table>

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


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

    <table width='100%' border='0' cellspacing='0' cellpadding='0'>
    <tr>
    <td colspan='3' style='line-height: 0;'><img
        src='/img/vsep.gif' width='170' height='25' border='0' vspace='0' hspace='0' alt='--sep--' /></td>
    </tr>

    <tr>
    <td colspan='3' style='line-height: 0;'><img
        src='/img/nav_top.gif' width='170' height='12' border='0' vspace='0' hspace='0' alt='Start Navigation' /></td>
    </tr>


    <tr>
    <td background='/img/nav_left.gif'><%= spacer(8,20) %></td>



    <td bgcolor='#330066'>
        <!-- actual navigation -->
		
		<%= apply_templates('document("/sidebar_new.xml")') %>
		
	</td>
	
    <td background='/img/nav_right.gif'><%= spacer(8,20) %></td>
    </tr>

    <tr>
    <td colspan='3' style='line-height: 0;'><img
        src='/img/nav_bot.gif' width='170' height='12' border='0' vspace='0' hspace='0' alt='End Navigation' /></td>
    </tr>
    </table>

</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')//title[1]/text()");
	if ($title eq 'Index') {
		print $part, " :: ";
	}
	else {
		print "<a href=\"$local\">", , "</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')//title[1]/text()"), "</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>
