Moving from exist-db 3.0.1 to 6.0.1 6.2.0
That's an awful lot of release notes to read through but it needs to be done, even though its hard to know how the changes will affect my code.
As a first step I need to get things working without being tempted to utilise new XQuery features (I haven't used maps and arrays ) [see https://www.w3.org/TR/xquery-30/] and new modules (spatial index)
Very tempting to clear out old stuff whilst I do this but of course would be better done beforehand.
Need to be sure which scripts are being invoked from Apache
Getting one website running - Bristol Sailing Association, loading from an unzipped backup of the 3.0.1 database + others
Usual problem of testing applications which use my approach a REST-style - most have a config set up to allow path prefix to be changed from /Tree/ to ?_path= For this to work care needed on where script is located in the directory tree .... and Ive been inconsistent about how I implement this scheme
lots of permissions to change since these are not included in the backup - no function for this in the eXide UI - need to write a small tool to set permissions and do reindexes - about time but why is it necessary - ask dannes
missing the old dashboard application - problems in using the eXide db:Manager can't get below the db level - Cant get client.sh to work - problem with X11 ; using webdav instead is working
math module import has changed to
import module namespace math ="http://www.w3.org/2005/xpath-functions/math"; (actually no longer needs to be declared at all)
math:power () changed to math:pow()
math:abs to fn:abs()
math:floor() to fn:floor()
math:ceil() to fn:ceiling()
? are the arguments to atan2 ($y,$x) the same as in the old Math module -yes
math:radians() and math:degrees() have gone - no replacement (I put them in geo but should I have a standalone module for these bits - some in tp, some in wfn ?
fn:round() takes a precision argument so can replace fn:round-half-to-even()
xsl:format-date() to fn:format-date() but the picture format is quite different see https://www.w3.org/TR/xpath-functions-31/
eg "DD MMM - HH:mm" becomes "[D01] [MN,*-3] - [H01]:[m01]"
httpclient module has gone - use http://expath.org/ns/http-client instead - API is here http://expath.org/modules/http-client/ httpclient offered different calls for different services eg head() which have to be done explicitly in expath version - could make a front with the same api but prob. not worth it - at least write a script to template and test the calls
The basic get call converts to :
import module namespace http ="http://expath.org/ns/http-client"; declare namespace html ="http://www.w3.org/1999/xhtml";
let $doc := http:send-request(
<http:request href="{$pageurl}" method="get"> </http:request> )
let $title := $doc[2]//html:body/html:h1[1]
util:catch() has gone - use XQuery3.0 construct try {} catch * {}
Exist now catches declarations of functions with the same name and arity (previously the last declaration was used)
util:serialize() has gone - use fn:serialize but the parameters element must be either an output:serialization-parameters element or a map
see the Altova documentation
eg to serialize to html
fn:serialize($description,map{"method":"xhtml","media-type":"text/html"}
SItes tested
BSA - needs more work on httpclient replacement
Morley sq - my REST Scheme but implemented on level deeper so hack to replace root with ?_path= works but paths to resources like javascript and css dont work
slow without indexes - now added but the eXide db:Manager doesn't do reindexing - have to use the client or write my own script
aremiti - working all except Tracks which hasnt worked for a while since it uses an obsolete API to google maps
berger - working through the faults -
medTrees - the Guide and Book fine out-of-the box - tools need testing because these use scraping
logger - dashboard working
Wikibook - this a set of comparisons of XQuery solutions to problems. It uses my REST scheme so can be run locally by configuring path. tests so far indicate the general architecture is working fine (very fast on the Dell). Some individual task solutions fail (but nicely since they are execute with try {} . This means that a new script which executes all tests and logs those that fail is possible.
util:parse has gone - use util:parse-html() which tidies HTML too
after a day's work, progress seems quite good - the lack of a unit test framework for this code is a problem when migrating code but the most time-consuming stuff is editing the code to update - not sure how to take the main trees application forward - good to do this while I'm away , just little by little because the server version wont be being updated at the same time - must ensure they stay in sync.
Sept 23
Resumed this work but with version 6.2.0 now
Version installed on the old thinkpad - tried to install on Marks' Asus but problems encountered which have yet to be resolved.
Jan 24
Windows replaced with Ubuntu and version 6.2.0 loaded and running - will be the test machine
full aremiti bitfolk database as of 2024-01-06 unzipped onto the ASUS
Oct 24
ported the newly consolidated knots and polyhedra applications (bar the STL files) - no new issues
ported medtrees
ported nabg - reverted to a query string
The dashboard has changed significantly
no shutdown - has to be done in admin client or on command line
no way to change permissions - the functions are no longer in xmldb module - can only be done in the admin client use manage in eXide
porting BSA3
replacement needed for httpclient:post-form()
In most cases, inclusion of these resources is done in the main script rather than a lib/module
BSA3 ported
porting morleysq
only problems running without apache front end
same problem with paths to resource
problem with paths to images
Problem testing applications which use rest urls - consistent use of $root is the key - so it can be changed from eg "MS/" to "?_path="
This works in urls but I haven't found a way of making it work in forms
using a setting $local:rest allows the $root to be selected and conditional code to be generated where needed
also when using URL rewriting, the target directory is one above the app directory to allow the same path to be used with other scripts in the same directory. Without this , the script is running in the application directory so all the paths to resources are one level different - need to sort this out - perhaps base should just be to the app directory and the root then includes the app directory OK that works
MorleySq now working but exist was thrashing and had to be killed
logging disabled
home - landing page
terrain - needs the maths in geo to be updated as does theroad
2025-01
geo module updated
new work scapping json from a website for BNG -test for geo and JSON handling
2025-10
new server using debian trixie (13) create and conversion to exist6.4 underway













