copied tests from martijnr/XPathJS_javarosa