Search

Upgrade to eXist-db 2.1 stable

My hobby server has been using eXist 1.4.2 and its high time to upgrade to 2.1 now that there is a stable release. This is quite a jump, but as others are making this switch, here are some of the issues I encountered.

Installation>

  • I installed in a Windows WP machine using the download for 2.1 rev 18721 - it installed fine At this stage I'm using the default settings but I will move the tool apps to their own directory because thats where I put my stuff
  • I uploaded the backup frpm the bitfolk server

Issues

  • Math changes. The math prefix is now bound by default to http://www.w3.org/2005/xpath-functions/math which does not implement the same functions as the old math module http://exist-db.org/xquery/math with some functions moved to the XPath module and some disappeared
    • math:abs() -> fn:abs()
    • math:sin() - no change
    • math:cos() - no change
    • math:ceil() -> fn:ceiling()
    • math:floor() -> fn:floor()
    • math:power() - now math:pow()
    • math:random() -> util:random()
  • fn:item-at($seg,$val) -> $seg[$val]
  • request:redirect-to -> response:redirect-to
  • I had a problem with accessing an attribute with values like 1, 1.1 which now are coerced to numbers whereas in earlier releases they were treated as strings unless explicitly converted to numbers [version in IATI code lists]
  • An odd bug exploitation has been removed - I had a collection of Trips defined as $bsa:trips := collection(concat($bsa:db,"trips"))//Trip; and then referenced then as $bsa:trips/Trip[newsletter=$id] and it worked on 1.4.2 but not (correctly so) on 2.1
  • Stricter access rights so files which need to be publicly writable like a log file need to have the access rights edited, as do scripts which are publicly executable
  • the following returned B in 1.4.2 but now returns nothing let $x := <a><b>B</b></a> let $y := $x/b return $y//b/string()
  • fn:string-pad() gone - no replacement but simple to code
  • the datetime module is no longer enabled by default. The documentation shows the function fn:format-date() and fn:format-dateTime(). However neither work - they just echo the picture. The versions in xsl do work however. The picture format for these functions are defined by the XPath 3.0 standard whilst the datetime functions use the java:SimpleDateFormat which tripped me up.
  • it is good to see some of the XSL functions now available, in particular format-number() and analyze-string(). fn:format-number() is an XPath 3.0 function and it works but is broken. For example fn:format-number(20,"000.0") returns 020.000 whereas xsl:format-number(20,"000.0") returns 020.0
  • fn:document() has been removed -> fn:doc()

The Dashboard

In the main the new Dashboard is an improvement. I do find I have to keep logging in and "remember me" doesnt seem to.

New Collection Browser:

  • Unlike the other dashboard applications, it is modal, so has to be closed to get back to the dashboard
  • editing access rights doesnt appear to work - I had to use the Java client instead
  • It is buggy and often breaks -"sorry an error has occured' Usually I can recover by logging into the old admin interface and going back to the new browser
  • The icons are miniscule and poorly distinguished
  • Opening a resource, even a binary resource. opens it up in in eXide. Not very useful for gifs. The old collection viewer opened the resource in a browser or executed it as appropriate. This is what I think a browser should do. It might be useful to have a way of opening the resource in eXide, but doesnt the eXide file browser do this anyway.
  • I had problems both creating new collections and uploading resources when the same task in the old collections viewer worked fine. If you do not have sufficent access rights to upload, you are stuck in a model dialog and have to close the window

eXide

I like eXide although at present I use it only as the old SandBox.

  • eXide hangs - "restoring state"
  • I found Button placement a bit of a problem - if I reduce the size of the window, the run button is the first to disappear yet it the one I most need. Run isnt available on a dropdown or with a shortcut that I could find

Packaging

To be honest I have yet to get on top of packaging with the EXPath standard. However I am surprised that the packages are installed in the commonly used apps collection, so that my applications are muddled up with the installed packages. I didn't get any name clashes as it happens, but I might in future. I also can't backup my applications alone. I would have prefered that these sit in a different packages directory. Overall it gives me the feeling of being a small part of an eXist product, when mostly I want it to be a XML database.

Function Documentation

This is still very terse and could do with expansion to include references to support documentation, such as the picture format for format-date. In my view, it also needs to allow user contribution of example usage and discussion, along the lines of the PHP reference manual. This is something I have advocated for some time but done little about it personally. A central site where documentation on all modules is still needed, perferably versioned. The current approach of providing documentation on the latest verion only is questionable.