The html5 geolocation getCurrentPosition function utilises callback functions in the form of:

navigator.geolocation.getCurrentPosition(successCallback,
                                             errorCallback,
                                             {maximumAge:600000});


function successCallback(position) { }

function errorCallback(error) { }


Is it possible to achieve the same functionality using Saxon CE and XSLT?