pretty insane thing, the xmlXPathFormatNumber() was not serializing 1 as * xpath.c: pretty insane thing, the xmlXPathFormatNumber() was not serializing 1 as "1" if LC_ALL=sv_SE :-( and in the context of ScrollKeeper, made sure that if the number is an integer, the serialization follows the description at http://www.w3.org/TR/xpath#section-String-Functions Daniel