I should point out that although I know my way around XQuery a bit, XML XSLT etc. I'm a complete novice with eXist-db.
I'm looking at a legacy eXist-db application, the query for the application is stored within the file structure. I've transferred the DB from 1.4 to 2.2 successfully, copied the folder containing the XQuery and styles, finally I've also fixed some XQuery oddities (specifically to do with request:get-parameter now return xs:string* rather than xs:string). So no longer get compile/runtime errors.
However, where I'm struggling is that it seems like the webserver in 1.4 was doing some transforms which it's not doing in 2.2. So when browsing the 1.4 application, I get the following response:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns:sidebar="http://exist-db.org/NS/sidebar" xmlns:exist="http://exist.sourceforge.net/NS/exist">
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<link href="style.css" type="text/css" rel="stylesheet">
</head>
<body bgcolor="#FFFFFF">
<table style="border-collapse:collapse;table-layout:fixed;width:1288pt" cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="207" valign="top">
<div class="logo">
<span style="color:red">SABRE</span><span style="color:black">-</span><span style="color:blue">DB</span>
</div>
<div class="version">
Version: 2.5.0</div>
<div class="dataset"></div>
<div xmlns:fn="http://exist-db.org/local-functions" class="sidebar"></div>
<div class="banner">
<img xmlns="http://exist-db.org/NS/sidebar" xmlns:xi="http://www.w3.org/2001/XInclude" alt="powered by eXist" border="0" src="../resources/powered.gif"/>
</div>
<div class="authors">
When using the 2.2 version, I get the following:
<document xmlns:xi="http://www.w3.org/2001/XInclude"><!--<xi:include href="context::/sabredb/sabre-header.xml"/>--><version>2.5.0</version>,
<dataset/>,
<sidebar xmlns="http://exist-db.org/NS/sidebar" title="Navigation">
<banner>
<img alt="powered by eXist" border="0" src="../resources/powered.gif"/>
</banner>
</sidebar>,
<user>not logged in</user><body><section title="blah"><div class="panel">
So somehow, it's not applying any templating to the generated XML... I think the sidebar may be a 1.2 specific feature.. but it's quite simply not styling the other nodes at all.. what am I missing?