*** libxslt-1.1.27/libxslt/functions.c	2012-09-12 11:26:36.000000000 +0100
--- new-libxslt-1.1.27/libxslt/functions.c	2012-11-15 14:25:11.151734063 +0000
***************
*** 659,664 ****
--- 659,665 ----
   */
  void
  xsltGenerateIdFunction(xmlXPathParserContextPtr ctxt, int nargs){
+     static char base_address;
      xmlNodePtr cur = NULL;
      xmlXPathObjectPtr obj = NULL;
      long val;
***************
*** 715,721 ****
      if (obj)
          xmlXPathFreeObject(obj);
  
!     val = (long)((char *)cur - (char *)doc);
      if (val >= 0) {
        sprintf((char *)str, "idp%ld", val);
      } else {
--- 716,722 ----
      if (obj)
          xmlXPathFreeObject(obj);
  
!     val = (long)((char *)cur - (char *)&base_address);
      if (val >= 0) {
        sprintf((char *)str, "idp%ld", val);
      } else {
