diff --git a/README b/README
index e63efa8be9a11f0e94382263d93a23573db37541_UkVBRE1F..a13372393b1ee191b8088a940b5846685dd6712c_UkVBRE1F 100644
--- a/README
+++ b/README
@@ -3,8 +3,8 @@
 
 		  http://xmlsoft.org/
 
- Requires libxml2 >= 2.3.0 with XPath support. It won't even compile
+ Requires libxml2 >= 2.3.6 with XPath support. It won't even compile
 otherwise.
  Check the FEATURES file for informations about completeness
  Check the Changelog too to keep track of progresses.
 
@@ -7,8 +7,8 @@
 otherwise.
  Check the FEATURES file for informations about completeness
  Check the Changelog too to keep track of progresses.
 
-   report bugs to xml@rpmfind.net or on the bugzilla.gnome.org base.
+   report bugs to xslt@gnome.org or on the bugzilla.gnome.org base.
 
 Daniel Veillard
 
diff --git a/configure.in b/configure.in
index e63efa8be9a11f0e94382263d93a23573db37541_Y29uZmlndXJlLmlu..a13372393b1ee191b8088a940b5846685dd6712c_Y29uZmlndXJlLmlu 100644
--- a/configure.in
+++ b/configure.in
@@ -48,6 +48,15 @@
     CFLAGS="-Wall -g -O -ansi -pedantic -W -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline "
 fi
 
+AC_ARG_WITH(debug, [  --with-debug            Add the debugging code (on)])
+if test "$with_mem_debug" = "no" ; then
+    echo Disabling debug support
+    WITH_XSLT_DEBUG=0
+else    
+    WITH_XSLT_DEBUG=1
+fi
+AC_SUBST(WITH_XSLT_DEBUG)
+
 AC_ARG_WITH(mem_debug, [  --with-mem-debug        Add the memory debugging module (off)])
 if test "$with_mem_debug" = "yes" ; then
     echo Enabling memory debug support
diff --git a/doc/html/libxslt-attributes.html b/doc/html/libxslt-attributes.html
index e63efa8be9a11f0e94382263d93a23573db37541_ZG9jL2h0bWwvbGlieHNsdC1hdHRyaWJ1dGVzLmh0bWw=..a13372393b1ee191b8088a940b5846685dd6712c_ZG9jL2h0bWwvbGlieHNsdC1hdHRyaWJ1dGVzLmh0bWw= 100644
--- a/doc/html/libxslt-attributes.html
+++ b/doc/html/libxslt-attributes.html
@@ -121,7 +121,7 @@
 ><DIV
 CLASS="REFNAMEDIV"
 ><A
-NAME="AEN2045"
+NAME="AEN2049"
 ></A
 ><H2
 >Name</H2
@@ -129,7 +129,7 @@
 ><DIV
 CLASS="REFSYNOPSISDIV"
 ><A
-NAME="AEN2048"
+NAME="AEN2052"
 ></A
 ><H2
 >Synopsis</H2
@@ -188,7 +188,7 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN2061"
+NAME="AEN2065"
 ></A
 ><H2
 >Description</H2
@@ -198,10 +198,10 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN2064"
+NAME="AEN2068"
 ></A
 ><H2
 >Details</H2
 ><DIV
 CLASS="REFSECT2"
 ><A
@@ -202,10 +202,10 @@
 ></A
 ><H2
 >Details</H2
 ><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2066"
+NAME="AEN2070"
 ></A
 ><H3
 ><A
@@ -258,7 +258,7 @@
 ><I
 >style</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -275,7 +275,7 @@
 ><I
 >cur</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -290,7 +290,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2087"
+NAME="AEN2091"
 ></A
 ><H3
 ><A
@@ -338,7 +338,7 @@
 ><I
 >style</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -353,7 +353,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2103"
+NAME="AEN2107"
 ></A
 ><H3
 ><A
@@ -413,7 +413,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -430,7 +430,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -447,7 +447,7 @@
 ><I
 >inst</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -464,7 +464,7 @@
 ><I
 >attributes</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
diff --git a/doc/html/libxslt-functions.html b/doc/html/libxslt-functions.html
index e63efa8be9a11f0e94382263d93a23573db37541_ZG9jL2h0bWwvbGlieHNsdC1mdW5jdGlvbnMuaHRtbA==..a13372393b1ee191b8088a940b5846685dd6712c_ZG9jL2h0bWwvbGlieHNsdC1mdW5jdGlvbnMuaHRtbA== 100644
--- a/doc/html/libxslt-functions.html
+++ b/doc/html/libxslt-functions.html
@@ -300,7 +300,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -317,7 +317,7 @@
 ><I
 >nargs</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -385,7 +385,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -402,7 +402,7 @@
 ><I
 >nargs</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -470,7 +470,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -487,7 +487,7 @@
 ><I
 >nargs</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -555,7 +555,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -572,7 +572,7 @@
 ><I
 >nargs</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -640,7 +640,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -657,7 +657,7 @@
 ><I
 >nargs</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -725,7 +725,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -742,7 +742,7 @@
 ><I
 >nargs</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -810,7 +810,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -827,7 +827,7 @@
 ><I
 >nargs</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -895,7 +895,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -912,7 +912,7 @@
 ><I
 >nargs</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -974,7 +974,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -991,7 +991,7 @@
 ><I
 >nargs</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1054,7 +1054,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
diff --git a/doc/html/libxslt-imports.html b/doc/html/libxslt-imports.html
index e63efa8be9a11f0e94382263d93a23573db37541_ZG9jL2h0bWwvbGlieHNsdC1pbXBvcnRzLmh0bWw=..a13372393b1ee191b8088a940b5846685dd6712c_ZG9jL2h0bWwvbGlieHNsdC1pbXBvcnRzLmh0bWw= 100644
--- a/doc/html/libxslt-imports.html
+++ b/doc/html/libxslt-imports.html
@@ -121,7 +121,7 @@
 ><DIV
 CLASS="REFNAMEDIV"
 ><A
-NAME="AEN2139"
+NAME="AEN2143"
 ></A
 ><H2
 >Name</H2
@@ -129,7 +129,7 @@
 ><DIV
 CLASS="REFSYNOPSISDIV"
 ><A
-NAME="AEN2142"
+NAME="AEN2146"
 ></A
 ><H2
 >Synopsis</H2
@@ -220,7 +220,7 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN2164"
+NAME="AEN2168"
 ></A
 ><H2
 >Description</H2
@@ -230,10 +230,10 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN2167"
+NAME="AEN2171"
 ></A
 ><H2
 >Details</H2
 ><DIV
 CLASS="REFSECT2"
 ><A
@@ -234,10 +234,10 @@
 ></A
 ><H2
 >Details</H2
 ><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2169"
+NAME="AEN2173"
 ></A
 ><H3
 ><A
@@ -280,7 +280,7 @@
 ><I
 >res</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -297,7 +297,7 @@
 ><I
 >style</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -314,7 +314,7 @@
 ><I
 >name</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -329,7 +329,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2191"
+NAME="AEN2195"
 ></A
 ><H3
 ><A
@@ -372,7 +372,7 @@
 ><I
 >res</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -389,7 +389,7 @@
 ><I
 >style</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -406,7 +406,7 @@
 ><I
 >name</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -421,7 +421,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2213"
+NAME="AEN2217"
 ></A
 ><H3
 ><A
@@ -474,7 +474,7 @@
 ><I
 >style</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -491,7 +491,7 @@
 ><I
 >cur</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -506,7 +506,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2234"
+NAME="AEN2238"
 ></A
 ><H3
 ><A
@@ -559,7 +559,7 @@
 ><I
 >style</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -576,7 +576,7 @@
 ><I
 >cur</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -591,7 +591,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2255"
+NAME="AEN2259"
 ></A
 ><H3
 ><A
@@ -642,7 +642,7 @@
 ><I
 >style</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -672,7 +672,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2276"
+NAME="AEN2280"
 ></A
 ><H3
 ><A
@@ -725,7 +725,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -742,7 +742,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -773,7 +773,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2301"
+NAME="AEN2305"
 ></A
 ><H3
 ><A
@@ -832,7 +832,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -849,7 +849,7 @@
 ><I
 >name</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -866,7 +866,7 @@
 ><I
 >nameURI</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
diff --git a/doc/html/libxslt-keys.html b/doc/html/libxslt-keys.html
index e63efa8be9a11f0e94382263d93a23573db37541_ZG9jL2h0bWwvbGlieHNsdC1rZXlzLmh0bWw=..a13372393b1ee191b8088a940b5846685dd6712c_ZG9jL2h0bWwvbGlieHNsdC1rZXlzLmh0bWw= 100644
--- a/doc/html/libxslt-keys.html
+++ b/doc/html/libxslt-keys.html
@@ -121,7 +121,7 @@
 ><DIV
 CLASS="REFNAMEDIV"
 ><A
-NAME="AEN2899"
+NAME="AEN2929"
 ></A
 ><H2
 >Name</H2
@@ -129,7 +129,7 @@
 ><DIV
 CLASS="REFSYNOPSISDIV"
 ><A
-NAME="AEN2902"
+NAME="AEN2932"
 ></A
 ><H2
 >Synopsis</H2
@@ -221,7 +221,7 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN2924"
+NAME="AEN2954"
 ></A
 ><H2
 >Description</H2
@@ -231,10 +231,10 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN2927"
+NAME="AEN2957"
 ></A
 ><H2
 >Details</H2
 ><DIV
 CLASS="REFSECT2"
 ><A
@@ -235,10 +235,10 @@
 ></A
 ><H2
 >Details</H2
 ><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2929"
+NAME="AEN2959"
 ></A
 ><H3
 ><A
@@ -302,7 +302,7 @@
 ><I
 >style</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -319,7 +319,7 @@
 ><I
 >name</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -336,7 +336,7 @@
 ><I
 >nameURI</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -353,7 +353,7 @@
 ><I
 >match</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -370,7 +370,7 @@
 ><I
 >use</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -400,7 +400,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2969"
+NAME="AEN2999"
 ></A
 ><H3
 ><A
@@ -463,7 +463,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -480,7 +480,7 @@
 ><I
 >name</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -497,7 +497,7 @@
 ><I
 >nameURI</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -514,7 +514,7 @@
 ><I
 >value</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -544,7 +544,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3005"
+NAME="AEN3035"
 ></A
 ><H3
 ><A
@@ -597,7 +597,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -614,7 +614,7 @@
 ><I
 >doc</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -629,7 +629,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3026"
+NAME="AEN3056"
 ></A
 ><H3
 ><A
@@ -677,7 +677,7 @@
 ><I
 >style</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -692,7 +692,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3042"
+NAME="AEN3072"
 ></A
 ><H3
 ><A
@@ -738,7 +738,7 @@
 ><I
 >doc</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
diff --git a/doc/html/libxslt-namespaces.html b/doc/html/libxslt-namespaces.html
index e63efa8be9a11f0e94382263d93a23573db37541_ZG9jL2h0bWwvbGlieHNsdC1uYW1lc3BhY2VzLmh0bWw=..a13372393b1ee191b8088a940b5846685dd6712c_ZG9jL2h0bWwvbGlieHNsdC1uYW1lc3BhY2VzLmh0bWw= 100644
--- a/doc/html/libxslt-namespaces.html
+++ b/doc/html/libxslt-namespaces.html
@@ -121,7 +121,7 @@
 ><DIV
 CLASS="REFNAMEDIV"
 ><A
-NAME="AEN2337"
+NAME="AEN2341"
 ></A
 ><H2
 >Name</H2
@@ -129,7 +129,7 @@
 ><DIV
 CLASS="REFSYNOPSISDIV"
 ><A
-NAME="AEN2340"
+NAME="AEN2344"
 ></A
 ><H2
 >Synopsis</H2
@@ -235,7 +235,7 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN2366"
+NAME="AEN2370"
 ></A
 ><H2
 >Description</H2
@@ -245,10 +245,10 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN2369"
+NAME="AEN2373"
 ></A
 ><H2
 >Details</H2
 ><DIV
 CLASS="REFSECT2"
 ><A
@@ -249,10 +249,10 @@
 ></A
 ><H2
 >Details</H2
 ><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2371"
+NAME="AEN2375"
 ></A
 ><H3
 ><A
@@ -305,7 +305,7 @@
 ><I
 >style</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -322,7 +322,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -337,7 +337,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2392"
+NAME="AEN2396"
 ></A
 ><H3
 ><A
@@ -402,7 +402,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -419,7 +419,7 @@
 ><I
 >cur</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -436,7 +436,7 @@
 ><I
 >ns</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -453,7 +453,7 @@
 ><I
 >out</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -483,7 +483,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2428"
+NAME="AEN2432"
 ></A
 ><H3
 ><A
@@ -548,7 +548,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -565,7 +565,7 @@
 ><I
 >cur</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -582,7 +582,7 @@
 ><I
 >URI</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -599,7 +599,7 @@
 ><I
 >prefix</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -616,7 +616,7 @@
 ><I
 >out</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -646,7 +646,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2468"
+NAME="AEN2472"
 ></A
 ><H3
 ><A
@@ -712,7 +712,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -729,7 +729,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -746,7 +746,7 @@
 ><I
 >cur</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -776,7 +776,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2500"
+NAME="AEN2504"
 ></A
 ><H3
 ><A
@@ -824,7 +824,7 @@
 ><I
 >style</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
diff --git a/doc/html/libxslt-numbersinternals.html b/doc/html/libxslt-numbersinternals.html
index e63efa8be9a11f0e94382263d93a23573db37541_ZG9jL2h0bWwvbGlieHNsdC1udW1iZXJzaW50ZXJuYWxzLmh0bWw=..a13372393b1ee191b8088a940b5846685dd6712c_ZG9jL2h0bWwvbGlieHNsdC1udW1iZXJzaW50ZXJuYWxzLmh0bWw= 100644
--- a/doc/html/libxslt-numbersinternals.html
+++ b/doc/html/libxslt-numbersinternals.html
@@ -109,7 +109,7 @@
 ><DIV
 CLASS="REFNAMEDIV"
 ><A
-NAME="AEN3507"
+NAME="AEN3537"
 ></A
 ><H2
 >Name</H2
@@ -117,7 +117,7 @@
 ><DIV
 CLASS="REFSYNOPSISDIV"
 ><A
-NAME="AEN3510"
+NAME="AEN3540"
 ></A
 ><H2
 >Synopsis</H2
@@ -176,7 +176,7 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN3523"
+NAME="AEN3553"
 ></A
 ><H2
 >Description</H2
@@ -186,10 +186,10 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN3526"
+NAME="AEN3556"
 ></A
 ><H2
 >Details</H2
 ><DIV
 CLASS="REFSECT2"
 ><A
@@ -190,10 +190,10 @@
 ></A
 ><H2
 >Details</H2
 ><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3528"
+NAME="AEN3558"
 ></A
 ><H3
 ><A
@@ -254,7 +254,7 @@
 ><I
 >Param1</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -271,7 +271,7 @@
 ><I
 >Param2</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -288,7 +288,7 @@
 ><I
 >Param3</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -305,7 +305,7 @@
 ><I
 >Param4</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -335,7 +335,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3563"
+NAME="AEN3593"
 ></A
 ><H3
 ><A
@@ -389,7 +389,7 @@
 ><I
 >Param1</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -406,7 +406,7 @@
 ><I
 >Param2</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -423,7 +423,7 @@
 ><I
 >Param3</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
diff --git a/doc/html/libxslt-pattern.html b/doc/html/libxslt-pattern.html
index e63efa8be9a11f0e94382263d93a23573db37541_ZG9jL2h0bWwvbGlieHNsdC1wYXR0ZXJuLmh0bWw=..a13372393b1ee191b8088a940b5846685dd6712c_ZG9jL2h0bWwvbGlieHNsdC1wYXR0ZXJuLmh0bWw= 100644
--- a/doc/html/libxslt-pattern.html
+++ b/doc/html/libxslt-pattern.html
@@ -396,7 +396,7 @@
 ><I
 >pattern</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -413,7 +413,7 @@
 ><I
 >doc</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -430,7 +430,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -513,7 +513,7 @@
 ><I
 >comp</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -584,7 +584,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -601,7 +601,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -618,7 +618,7 @@
 ><I
 >comp</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -713,7 +713,7 @@
 ><I
 >style</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -730,7 +730,7 @@
 ><I
 >cur</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -747,7 +747,7 @@
 ><I
 >mode</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -764,7 +764,7 @@
 ><I
 >modeURI</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -859,7 +859,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -876,7 +876,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -893,7 +893,7 @@
 ><I
 >style</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -971,7 +971,7 @@
 ><I
 >style</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1035,7 +1035,7 @@
 ><I
 >style</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1106,7 +1106,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1123,7 +1123,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1140,7 +1140,7 @@
 ><I
 >pattern</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
diff --git a/doc/html/libxslt-templates.html b/doc/html/libxslt-templates.html
index e63efa8be9a11f0e94382263d93a23573db37541_ZG9jL2h0bWwvbGlieHNsdC10ZW1wbGF0ZXMuaHRtbA==..a13372393b1ee191b8088a940b5846685dd6712c_ZG9jL2h0bWwvbGlieHNsdC10ZW1wbGF0ZXMuaHRtbA== 100644
--- a/doc/html/libxslt-templates.html
+++ b/doc/html/libxslt-templates.html
@@ -373,7 +373,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -390,7 +390,7 @@
 ><I
 >comp</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -481,7 +481,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -498,7 +498,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -515,7 +515,7 @@
 ><I
 >parent</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -611,7 +611,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -628,7 +628,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -645,7 +645,7 @@
 ><I
 >name</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -662,7 +662,7 @@
 ><I
 >ns</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -758,7 +758,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -775,7 +775,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -792,7 +792,7 @@
 ><I
 >name</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -809,7 +809,7 @@
 ><I
 >ns</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -826,7 +826,7 @@
 ><I
 >found</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -912,7 +912,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -929,7 +929,7 @@
 ><I
 >comp</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1015,7 +1015,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1032,7 +1032,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1121,7 +1121,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1138,7 +1138,7 @@
 ><I
 >target</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1155,7 +1155,7 @@
 ><I
 >cur</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1244,7 +1244,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1261,7 +1261,7 @@
 ><I
 >target</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1278,7 +1278,7 @@
 ><I
 >attr</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1363,7 +1363,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1380,7 +1380,7 @@
 ><I
 >attr</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
diff --git a/doc/html/libxslt-transform.html b/doc/html/libxslt-transform.html
index e63efa8be9a11f0e94382263d93a23573db37541_ZG9jL2h0bWwvbGlieHNsdC10cmFuc2Zvcm0uaHRtbA==..a13372393b1ee191b8088a940b5846685dd6712c_ZG9jL2h0bWwvbGlieHNsdC10cmFuc2Zvcm0uaHRtbA== 100644
--- a/doc/html/libxslt-transform.html
+++ b/doc/html/libxslt-transform.html
@@ -157,7 +157,8 @@
                                              <GTKDOCLINK
 HREF="XMLDOCPTR"
 >xmlDocPtr</GTKDOCLINK
-> doc);
+> doc,
+                                             const char **params);
 void        <A
 HREF="libxslt-transform.html#XSLTAPPLYONETEMPLATE"
 >xsltApplyOneTemplate</A
@@ -547,7 +548,8 @@
                                              <GTKDOCLINK
 HREF="XMLDOCPTR"
 >xmlDocPtr</GTKDOCLINK
-> doc);</PRE
+> doc,
+                                             const char **params);</PRE
 ></TD
 ></TR
 ></TABLE
@@ -577,7 +579,7 @@
 ><I
 >style</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -594,7 +596,7 @@
 ><I
 >doc</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -606,6 +608,23 @@
 WIDTH="20%"
 ALIGN="RIGHT"
 VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>params</I
+></TT
+>:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>  a NULL terminated arry of parameters names/values tuples</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
 ><I
 CLASS="EMPHASIS"
 >Returns</I
@@ -624,7 +643,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1042"
+NAME="AEN1046"
 ></A
 ><H3
 ><A
@@ -681,7 +700,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -698,7 +717,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -715,7 +734,7 @@
 ><I
 >list</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -732,7 +751,7 @@
 ><I
 >real</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -747,7 +766,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1072"
+NAME="AEN1076"
 ></A
 ><H3
 ><A
@@ -807,7 +826,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -824,7 +843,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -841,7 +860,7 @@
 ><I
 >inst</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -858,7 +877,7 @@
 ><I
 >comp</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -873,7 +892,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1103"
+NAME="AEN1107"
 ></A
 ><H3
 ><A
@@ -933,7 +952,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -950,7 +969,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -967,7 +986,7 @@
 ><I
 >inst</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -984,7 +1003,7 @@
 ><I
 >comp</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -999,7 +1018,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1134"
+NAME="AEN1138"
 ></A
 ><H3
 ><A
@@ -1059,7 +1078,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1076,7 +1095,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1093,7 +1112,7 @@
 ><I
 >inst</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1110,7 +1129,7 @@
 ><I
 >comp</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1125,7 +1144,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1165"
+NAME="AEN1169"
 ></A
 ><H3
 ><A
@@ -1185,7 +1204,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1202,7 +1221,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1219,7 +1238,7 @@
 ><I
 >inst</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1236,7 +1255,7 @@
 ><I
 >comp</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1251,7 +1270,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1196"
+NAME="AEN1200"
 ></A
 ><H3
 ><A
@@ -1311,7 +1330,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1328,7 +1347,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1345,7 +1364,7 @@
 ><I
 >inst</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1362,7 +1381,7 @@
 ><I
 >comp</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1377,7 +1396,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1227"
+NAME="AEN1231"
 ></A
 ><H3
 ><A
@@ -1437,7 +1456,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1454,7 +1473,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1471,7 +1490,7 @@
 ><I
 >inst</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1488,7 +1507,7 @@
 ><I
 >comp</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1503,7 +1522,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1258"
+NAME="AEN1262"
 ></A
 ><H3
 ><A
@@ -1563,7 +1582,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1580,7 +1599,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1597,7 +1616,7 @@
 ><I
 >inst</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1614,7 +1633,7 @@
 ><I
 >comp</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1629,7 +1648,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1289"
+NAME="AEN1293"
 ></A
 ><H3
 ><A
@@ -1689,7 +1708,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1706,7 +1725,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1723,7 +1742,7 @@
 ><I
 >inst</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1740,7 +1759,7 @@
 ><I
 >comp</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1755,7 +1774,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1320"
+NAME="AEN1324"
 ></A
 ><H3
 ><A
@@ -1815,7 +1834,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1832,7 +1851,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1849,7 +1868,7 @@
 ><I
 >inst</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1866,7 +1885,7 @@
 ><I
 >comp</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1881,7 +1900,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1351"
+NAME="AEN1355"
 ></A
 ><H3
 ><A
@@ -1941,7 +1960,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1958,7 +1977,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1975,7 +1994,7 @@
 ><I
 >inst</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1992,7 +2011,7 @@
 ><I
 >comp</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2007,7 +2026,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1382"
+NAME="AEN1386"
 ></A
 ><H3
 ><A
@@ -2067,7 +2086,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2084,7 +2103,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2101,7 +2120,7 @@
 ><I
 >inst</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2118,7 +2137,7 @@
 ><I
 >comp</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2133,7 +2152,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1413"
+NAME="AEN1417"
 ></A
 ><H3
 ><A
@@ -2193,7 +2212,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2210,7 +2229,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2227,7 +2246,7 @@
 ><I
 >inst</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2244,7 +2263,7 @@
 ><I
 >comp</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2259,7 +2278,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1444"
+NAME="AEN1448"
 ></A
 ><H3
 ><A
@@ -2319,7 +2338,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2336,7 +2355,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2353,7 +2372,7 @@
 ><I
 >inst</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2370,7 +2389,7 @@
 ><I
 >comp</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2385,7 +2404,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1475"
+NAME="AEN1479"
 ></A
 ><H3
 ><A
@@ -2445,7 +2464,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2462,7 +2481,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2479,7 +2498,7 @@
 ><I
 >inst</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2496,7 +2515,7 @@
 ><I
 >comp</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2511,7 +2530,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1506"
+NAME="AEN1510"
 ></A
 ><H3
 ><A
@@ -2571,7 +2590,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2588,7 +2607,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2605,7 +2624,7 @@
 ><I
 >inst</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2622,7 +2641,7 @@
 ><I
 >comp</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2637,7 +2656,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1537"
+NAME="AEN1541"
 ></A
 ><H3
 ><A
@@ -2697,7 +2716,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2714,7 +2733,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2731,7 +2750,7 @@
 ><I
 >inst</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2748,7 +2767,7 @@
 ><I
 >comp</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2763,7 +2782,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1568"
+NAME="AEN1572"
 ></A
 ><H3
 ><A
@@ -2823,7 +2842,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2840,7 +2859,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2857,7 +2876,7 @@
 ><I
 >inst</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2874,7 +2893,7 @@
 ><I
 >comp</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
diff --git a/doc/html/libxslt-variables.html b/doc/html/libxslt-variables.html
index e63efa8be9a11f0e94382263d93a23573db37541_ZG9jL2h0bWwvbGlieHNsdC12YXJpYWJsZXMuaHRtbA==..a13372393b1ee191b8088a940b5846685dd6712c_ZG9jL2h0bWwvbGlieHNsdC12YXJpYWJsZXMuaHRtbA== 100644
--- a/doc/html/libxslt-variables.html
+++ b/doc/html/libxslt-variables.html
@@ -121,7 +121,7 @@
 ><DIV
 CLASS="REFNAMEDIV"
 ><A
-NAME="AEN2521"
+NAME="AEN2525"
 ></A
 ><H2
 >Name</H2
@@ -129,7 +129,7 @@
 ><DIV
 CLASS="REFSYNOPSISDIV"
 ><A
-NAME="AEN2524"
+NAME="AEN2528"
 ></A
 ><H2
 >Synopsis</H2
@@ -155,6 +155,14 @@
 HREF="libxslt-xsltinternals.html#XSLTTRANSFORMCONTEXTPTR"
 >xsltTransformContextPtr</A
 > ctxt);
+int         <A
+HREF="libxslt-variables.html#XSLTEVALUSERPARAMS"
+>xsltEvalUserParams</A
+>              (<A
+HREF="libxslt-xsltinternals.html#XSLTTRANSFORMCONTEXTPTR"
+>xsltTransformContextPtr</A
+> ctxt,
+                                             const char **params);
 void        <A
 HREF="libxslt-variables.html#XSLTPUSHSTACK"
 >xsltPushStack</A
@@ -310,7 +318,7 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN2570"
+NAME="AEN2576"
 ></A
 ><H2
 >Description</H2
@@ -320,10 +328,10 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN2573"
+NAME="AEN2579"
 ></A
 ><H2
 >Details</H2
 ><DIV
 CLASS="REFSECT2"
 ><A
@@ -324,10 +332,10 @@
 ></A
 ><H2
 >Details</H2
 ><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2575"
+NAME="AEN2581"
 ></A
 ><H3
 ><A
@@ -370,7 +378,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -385,7 +393,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2589"
+NAME="AEN2595"
 ></A
 ><H3
 ><A
@@ -434,7 +442,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -464,7 +472,104 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2609"
+NAME="AEN2615"
+></A
+><H3
+><A
+NAME="XSLTEVALUSERPARAMS"
+></A
+>xsltEvalUserParams ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>int         xsltEvalUserParams              (<A
+HREF="libxslt-xsltinternals.html#XSLTTRANSFORMCONTEXTPTR"
+>xsltTransformContextPtr</A
+> ctxt,
+                                             const char **params);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Evaluate the global variables of a stylesheet. This need to be
+done on parsed stylesheets before starting to apply transformations</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ctxt</I
+></TT
+>:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>  the XSLT transformation context</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>params</I
+></TT
+>:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>  a NULL terminated arry of parameters names/values tuples</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>0 in case of success, -1 in case of error</TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2639"
 ></A
 ><H3
 ><A
@@ -510,7 +615,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -525,7 +630,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2624"
+NAME="AEN2654"
 ></A
 ><H3
 ><A
@@ -571,7 +676,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -586,7 +691,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2639"
+NAME="AEN2669"
 ></A
 ><H3
 ><A
@@ -639,7 +744,7 @@
 ><I
 >style</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -656,7 +761,7 @@
 ><I
 >cur</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -671,7 +776,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2660"
+NAME="AEN2690"
 ></A
 ><H3
 ><A
@@ -724,7 +829,7 @@
 ><I
 >style</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -741,7 +846,7 @@
 ><I
 >cur</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -756,7 +861,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2681"
+NAME="AEN2711"
 ></A
 ><H3
 ><A
@@ -809,7 +914,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -826,7 +931,7 @@
 ><I
 >cur</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -841,7 +946,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2702"
+NAME="AEN2732"
 ></A
 ><H3
 ><A
@@ -894,7 +999,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -911,7 +1016,7 @@
 ><I
 >cur</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -926,7 +1031,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2723"
+NAME="AEN2753"
 ></A
 ><H3
 ><A
@@ -985,7 +1090,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1002,7 +1107,7 @@
 ><I
 >cur</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1032,7 +1137,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2750"
+NAME="AEN2780"
 ></A
 ><H3
 ><A
@@ -1084,7 +1189,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1101,7 +1206,7 @@
 ><I
 >elems</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1131,7 +1236,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2775"
+NAME="AEN2805"
 ></A
 ><H3
 ><A
@@ -1177,7 +1282,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1192,7 +1297,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2790"
+NAME="AEN2820"
 ></A
 ><H3
 ><A
@@ -1252,7 +1357,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1269,7 +1374,7 @@
 ><I
 >name</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1286,7 +1391,7 @@
 ><I
 >ns_uri</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1316,7 +1421,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2821"
+NAME="AEN2851"
 ></A
 ><H3
 ><A
@@ -1381,7 +1486,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1398,7 +1503,7 @@
 ><I
 >name</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1415,7 +1520,7 @@
 ><I
 >ns_uri</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1432,7 +1537,7 @@
 ><I
 >select</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1449,7 +1554,7 @@
 ><I
 >tree</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1466,7 +1571,7 @@
 ><I
 >param</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1496,7 +1601,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2865"
+NAME="AEN2895"
 ></A
 ><H3
 ><A
@@ -1550,7 +1655,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1567,7 +1672,7 @@
 ><I
 >name</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1584,7 +1689,7 @@
 ><I
 >ns_uri</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
diff --git a/doc/html/libxslt-xsltinternals.html b/doc/html/libxslt-xsltinternals.html
index e63efa8be9a11f0e94382263d93a23573db37541_ZG9jL2h0bWwvbGlieHNsdC14c2x0aW50ZXJuYWxzLmh0bWw=..a13372393b1ee191b8088a940b5846685dd6712c_ZG9jL2h0bWwvbGlieHNsdC14c2x0aW50ZXJuYWxzLmh0bWw= 100644
--- a/doc/html/libxslt-xsltinternals.html
+++ b/doc/html/libxslt-xsltinternals.html
@@ -121,7 +121,7 @@
 ><DIV
 CLASS="REFNAMEDIV"
 ><A
-NAME="AEN3062"
+NAME="AEN3092"
 ></A
 ><H2
 >Name</H2
@@ -129,7 +129,7 @@
 ><DIV
 CLASS="REFSYNOPSISDIV"
 ><A
-NAME="AEN3065"
+NAME="AEN3095"
 ></A
 ><H2
 >Synopsis</H2
@@ -372,7 +372,7 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN3127"
+NAME="AEN3157"
 ></A
 ><H2
 >Description</H2
@@ -382,10 +382,10 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN3130"
+NAME="AEN3160"
 ></A
 ><H2
 >Details</H2
 ><DIV
 CLASS="REFSECT2"
 ><A
@@ -386,10 +386,10 @@
 ></A
 ><H2
 >Details</H2
 ><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3132"
+NAME="AEN3162"
 ></A
 ><H3
 ><A
@@ -418,7 +418,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3137"
+NAME="AEN3167"
 ></A
 ><H3
 ><A
@@ -453,7 +453,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3142"
+NAME="AEN3172"
 ></A
 ><H3
 ><A
@@ -479,7 +479,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3147"
+NAME="AEN3177"
 ></A
 ><H3
 ><A
@@ -505,7 +505,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3152"
+NAME="AEN3182"
 ></A
 ><H3
 ><A
@@ -542,7 +542,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3157"
+NAME="AEN3187"
 ></A
 ><H3
 ><A
@@ -568,7 +568,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3162"
+NAME="AEN3192"
 ></A
 ><H3
 ><A
@@ -622,7 +622,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3167"
+NAME="AEN3197"
 ></A
 ><H3
 ><A
@@ -723,7 +723,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3172"
+NAME="AEN3202"
 ></A
 ><H3
 ><A
@@ -749,7 +749,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3177"
+NAME="AEN3207"
 ></A
 ><H3
 ><A
@@ -796,5 +796,5 @@
     xsltDocumentPtr docList;		/* the document list */
 
     xsltDocumentPtr document;		/* the current document */
-    xmlNodePtr node;			/* the node being processed */
+    xmlNodePtr node;			/* the current node being processed */
     xmlNodeSetPtr nodeList;		/* the current node list */
@@ -800,5 +800,5 @@
     xmlNodeSetPtr nodeList;		/* the current node list */
-    xmlNodePtr current;			/* the current node */
+    /* xmlNodePtr current;			the node */
 
     xmlDocPtr output;			/* the resulting document */
     xmlNodePtr insert;			/* the insertion node */
@@ -815,7 +815,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3182"
+NAME="AEN3212"
 ></A
 ><H3
 ><A
@@ -841,7 +841,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3187"
+NAME="AEN3217"
 ></A
 ><H3
 ><A
@@ -900,6 +900,8 @@
     xsltNumberData numdata;	/* number */
 
     xmlXPathCompExprPtr comp;	/* a precompiled XPath expression */
+    xmlNsPtr *nsList;		/* the namespaces in scope */
+    int nsNr;			/* the number of namespaces in scope */
 };</PRE
 ></TD
 ></TR
@@ -910,7 +912,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3192"
+NAME="AEN3222"
 ></A
 ><H3
 ><A
@@ -936,7 +938,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3197"
+NAME="AEN3227"
 ></A
 ><H3
 ><A
@@ -994,7 +996,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1011,7 +1013,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1028,7 +1030,7 @@
 ><I
 >inst</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1045,7 +1047,7 @@
 ><I
 >comp</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1060,7 +1062,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3227"
+NAME="AEN3257"
 ></A
 ><H3
 ><A
@@ -1104,7 +1106,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3232"
+NAME="AEN3262"
 ></A
 ><H3
 ><A
@@ -1134,7 +1136,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3237"
+NAME="AEN3267"
 ></A
 ><H3
 ><A
@@ -1164,7 +1166,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3242"
+NAME="AEN3272"
 ></A
 ><H3
 ><A
@@ -1180,7 +1182,7 @@
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->#define CHECK_STOPPED if (ctxt-&gt;state == XSLT_STATE_STOPPED) return;</PRE
+>#define CHECK_STOPPED if (ctxt-state == XSLT_STATE_STOPPED) return;</PRE
 ></TD
 ></TR
 ></TABLE
@@ -1190,7 +1192,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3247"
+NAME="AEN3277"
 ></A
 ><H3
 ><A
@@ -1206,7 +1208,7 @@
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->#define CHECK_STOPPEDE if (ctxt-&gt;state == XSLT_STATE_STOPPED) goto error;</PRE
+>#define CHECK_STOPPEDE if (ctxt-state == XSLT_STATE_STOPPED) goto error;</PRE
 ></TD
 ></TR
 ></TABLE
@@ -1216,7 +1218,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3252"
+NAME="AEN3282"
 ></A
 ><H3
 ><A
@@ -1232,7 +1234,7 @@
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->#define CHECK_STOPPED0 if (ctxt-&gt;state == XSLT_STATE_STOPPED) return(0);</PRE
+>#define CHECK_STOPPED0 if (ctxt-state == XSLT_STATE_STOPPED) return(0);</PRE
 ></TD
 ></TR
 ></TABLE
@@ -1242,7 +1244,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3257"
+NAME="AEN3287"
 ></A
 ><H3
 ><A
@@ -1303,7 +1305,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3273"
+NAME="AEN3303"
 ></A
 ><H3
 ><A
@@ -1354,7 +1356,7 @@
 ><I
 >filename</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1384,7 +1386,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3294"
+NAME="AEN3324"
 ></A
 ><H3
 ><A
@@ -1437,7 +1439,7 @@
 ><I
 >sheet</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1452,7 +1454,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3311"
+NAME="AEN3341"
 ></A
 ><H3
 ><A
@@ -1500,7 +1502,7 @@
 ><I
 >str</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1530,7 +1532,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3331"
+NAME="AEN3361"
 ></A
 ><H3
 ><A
@@ -1583,7 +1585,7 @@
 ><I
 >elem</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1598,7 +1600,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3348"
+NAME="AEN3378"
 ></A
 ><H3
 ><A
@@ -1654,7 +1656,7 @@
 ><I
 >sheet</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1671,7 +1673,7 @@
 ><I
 >name</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1701,7 +1703,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3374"
+NAME="AEN3404"
 ></A
 ><H3
 ><A
@@ -1757,7 +1759,7 @@
 ><I
 >ret</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1774,7 +1776,7 @@
 ><I
 >doc</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1804,7 +1806,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3400"
+NAME="AEN3430"
 ></A
 ><H3
 ><A
@@ -1857,7 +1859,7 @@
 ><I
 >style</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1874,7 +1876,7 @@
 ><I
 >cur</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1889,7 +1891,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3421"
+NAME="AEN3451"
 ></A
 ><H3
 ><A
@@ -1940,7 +1942,7 @@
 ><I
 >doc</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1970,7 +1972,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3442"
+NAME="AEN3472"
 ></A
 ><H3
 ><A
@@ -2024,7 +2026,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2041,7 +2043,7 @@
 ><I
 >data</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2058,7 +2060,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2073,7 +2075,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3467"
+NAME="AEN3497"
 ></A
 ><H3
 ><A
@@ -2134,7 +2136,7 @@
 ><I
 >self</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2151,7 +2153,7 @@
 ><I
 >format</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2168,7 +2170,7 @@
 ><I
 >number</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -2185,7 +2187,7 @@
 ><I
 >result</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
diff --git a/doc/html/libxslt-xsltutils.html b/doc/html/libxslt-xsltutils.html
index e63efa8be9a11f0e94382263d93a23573db37541_ZG9jL2h0bWwvbGlieHNsdC14c2x0dXRpbHMuaHRtbA==..a13372393b1ee191b8088a940b5846685dd6712c_ZG9jL2h0bWwvbGlieHNsdC14c2x0dXRpbHMuaHRtbA== 100644
--- a/doc/html/libxslt-xsltutils.html
+++ b/doc/html/libxslt-xsltutils.html
@@ -121,7 +121,7 @@
 ><DIV
 CLASS="REFNAMEDIV"
 ><A
-NAME="AEN1604"
+NAME="AEN1608"
 ></A
 ><H2
 >Name</H2
@@ -129,7 +129,7 @@
 ><DIV
 CLASS="REFSYNOPSISDIV"
 ><A
-NAME="AEN1607"
+NAME="AEN1611"
 ></A
 ><H2
 >Synopsis</H2
@@ -318,7 +318,7 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN1653"
+NAME="AEN1657"
 ></A
 ><H2
 >Description</H2
@@ -328,10 +328,10 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN1656"
+NAME="AEN1660"
 ></A
 ><H2
 >Details</H2
 ><DIV
 CLASS="REFSECT2"
 ><A
@@ -332,10 +332,10 @@
 ></A
 ><H2
 >Details</H2
 ><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1658"
+NAME="AEN1662"
 ></A
 ><H3
 ><A
@@ -381,7 +381,7 @@
 ><I
 >name</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -411,7 +411,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1677"
+NAME="AEN1681"
 ></A
 ><H3
 ><A
@@ -464,7 +464,7 @@
 ><I
 >name</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -481,7 +481,7 @@
 ><I
 >prefix</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -511,7 +511,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1702"
+NAME="AEN1706"
 ></A
 ><H3
 ><A
@@ -558,7 +558,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -575,7 +575,7 @@
 ><I
 >nargs</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -590,7 +590,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1721"
+NAME="AEN1725"
 ></A
 ><H3
 ><A
@@ -616,7 +616,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1726"
+NAME="AEN1730"
 ></A
 ><H3
 ><A
@@ -642,7 +642,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1731"
+NAME="AEN1735"
 ></A
 ><H3
 ><A
@@ -685,7 +685,7 @@
 ><I
 >n</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -700,7 +700,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1745"
+NAME="AEN1749"
 ></A
 ><H3
 ><A
@@ -743,7 +743,7 @@
 ><I
 >n</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -760,7 +760,7 @@
 ><I
 >val</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -775,7 +775,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1763"
+NAME="AEN1767"
 ></A
 ><H3
 ><A
@@ -801,7 +801,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1768"
+NAME="AEN1772"
 ></A
 ><H3
 ><A
@@ -827,7 +827,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1773"
+NAME="AEN1777"
 ></A
 ><H3
 ><A
@@ -853,7 +853,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1778"
+NAME="AEN1782"
 ></A
 ><H3
 ><A
@@ -879,7 +879,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1783"
+NAME="AEN1787"
 ></A
 ><H3
 ><A
@@ -935,7 +935,7 @@
 ><I
 >ctxt</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -952,7 +952,7 @@
 ><I
 >node</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -969,7 +969,7 @@
 ><I
 >inst</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -984,7 +984,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1809"
+NAME="AEN1813"
 ></A
 ><H3
 ><A
@@ -1064,7 +1064,7 @@
 ><I
 >ctx</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1081,7 +1081,7 @@
 ><I
 >handler</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1096,7 +1096,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1834"
+NAME="AEN1838"
 ></A
 ><H3
 ><A
@@ -1176,7 +1176,7 @@
 ><I
 >ctx</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1193,7 +1193,7 @@
 ><I
 >handler</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1208,7 +1208,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1859"
+NAME="AEN1863"
 ></A
 ><H3
 ><A
@@ -1261,7 +1261,7 @@
 ><I
 >list</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1276,7 +1276,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1876"
+NAME="AEN1880"
 ></A
 ><H3
 ><A
@@ -1341,7 +1341,7 @@
 ><I
 >list</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1358,7 +1358,7 @@
 ><I
 >results</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1375,7 +1375,7 @@
 ><I
 >descending</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1392,7 +1392,7 @@
 ><I
 >number</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1407,7 +1407,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1907"
+NAME="AEN1911"
 ></A
 ><H3
 ><A
@@ -1479,7 +1479,7 @@
 ><I
 >buf</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1496,7 +1496,7 @@
 ><I
 >result</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1513,7 +1513,7 @@
 ><I
 >style</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1543,7 +1543,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1940"
+NAME="AEN1944"
 ></A
 ><H3
 ><A
@@ -1613,7 +1613,7 @@
 ><I
 >URI</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1630,7 +1630,7 @@
 ><I
 >result</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1647,7 +1647,7 @@
 ><I
 >style</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1664,7 +1664,7 @@
 ><I
 >compression</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1694,7 +1694,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1976"
+NAME="AEN1980"
 ></A
 ><H3
 ><A
@@ -1767,7 +1767,7 @@
 ><I
 >file</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1784,7 +1784,7 @@
 ><I
 >result</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1801,7 +1801,7 @@
 ><I
 >style</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1831,7 +1831,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2009"
+NAME="AEN2013"
 ></A
 ><H3
 ><A
@@ -1896,7 +1896,7 @@
 ><I
 >fd</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1913,7 +1913,7 @@
 ><I
 >result</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
@@ -1930,7 +1930,7 @@
 ><I
 >style</I
 ></TT
->&nbsp;:</TD
+>:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
diff --git a/doc/xslt.html b/doc/xslt.html
index e63efa8be9a11f0e94382263d93a23573db37541_ZG9jL3hzbHQuaHRtbA==..a13372393b1ee191b8088a940b5846685dd6712c_ZG9jL3hzbHQuaHRtbA== 100644
--- a/doc/xslt.html
+++ b/doc/xslt.html
@@ -153,6 +153,26 @@
 href="http://cvs.gnome.org/lxr/source/libxslt/ChangeLog">Changelog</a> file
 for a really accurate description</h3>
 
+<h3>0.8.0: Apr 22 2001</h3>
+<ul>
+  <li>fixed ansidecl.h problem</li>
+  <li>fixed unparsed-entity-uri() and generate-id()</li>
+  <li>sort semantic fixes and priority prob from William M. Brack</li>
+  <li>fixed namespace handling problems in XPath expression computations
+    (requires libxml-2.3.7)</li>
+  <li>fixes to current() and key()</li>
+  <li>other, smaller fixes, lots of testing with N Walsh DocBook HTML
+    stylesheets</li>
+</ul>
+
+<h3>0.7.0: Apr 10 2001</h3>
+<ul>
+  <li>cleanup using stricter compiler flags</li>
+  <li>command line parameter passing</li>
+  <li>fix to xsltApplyTemplates from William M. Brack</li>
+  <li>added the XSLTMark in the regression tests as well as document()</li>
+</ul>
+
 <h3>0.6.0: Mar 22 2001</h3>
 <ul>
   <li>another beta</li>
diff --git a/libxslt/attributes.c b/libxslt/attributes.c
index e63efa8be9a11f0e94382263d93a23573db37541_bGlieHNsdC9hdHRyaWJ1dGVzLmM=..a13372393b1ee191b8088a940b5846685dd6712c_bGlieHNsdC9hdHRyaWJ1dGVzLmM= 100644
--- a/libxslt/attributes.c
+++ b/libxslt/attributes.c
@@ -46,7 +46,9 @@
 #include "imports.h"
 #include "transform.h"
 
-#define DEBUG_ATTRIBUTES
+#ifdef WITH_XSLT_DEBUG
+#define WITH_XSLT_DEBUG_ATTRIBUTES
+#endif
 
 /*
  * TODO: merge attribute sets from different import precedence.
@@ -265,7 +267,7 @@
     }
 
     if (style->attributeSets == NULL) {
-#ifdef DEBUG_ATTRIBUTES
+#ifdef WITH_XSLT_DEBUG_ATTRIBUTES
 	xsltGenericDebug(xsltGenericDebugContext,
 	    "creating attribute set table\n");
 #endif
@@ -289,7 +291,7 @@
 		                 list->name);
 		delete = list;
 	    } else {
-#ifdef DEBUG_ATTRIBUTES
+#ifdef WITH_XSLT_DEBUG_ATTRIBUTES
 		xsltGenericDebug(xsltGenericDebugContext,
 		    "add attribute to list %s\n", ncname);
 #endif
@@ -326,7 +328,7 @@
 	    xmlChar *ncname2 = NULL;
 	    xmlChar *prefix2 = NULL;
 	    xsltAttrElemPtr values2;
-#ifdef DEBUG_ATTRIBUTES
+#ifdef WITH_XSLT_DEBUG_ATTRIBUTES
 	    xsltGenericDebug(xsltGenericDebugContext,
 		"xslt:attribute-set : %s adds use %s\n", ncname, attribute);
 #endif
@@ -355,7 +357,7 @@
      * Update the value
      */
     xmlHashUpdateEntry2(style->attributeSets, ncname, prefix, values, NULL);
-#ifdef DEBUG_ATTRIBUTES
+#ifdef WITH_XSLT_DEBUG_ATTRIBUTES
     xsltGenericDebug(xsltGenericDebugContext,
 	"updated attribute list %s\n", ncname);
 #endif
@@ -401,7 +403,7 @@
 	while ((*end != 0) && (!IS_BLANK(*end))) end++;
 	attribute = xmlStrndup(attribute, end - attribute);
 	if (attribute) {
-#ifdef DEBUG_ATTRIBUTES
+#ifdef WITH_XSLT_DEBUG_ATTRIBUTES
 	    xsltGenericDebug(xsltGenericDebugContext,
 		"apply attribute set %s\n", attribute);
 #endif
diff --git a/libxslt/documents.c b/libxslt/documents.c
index e63efa8be9a11f0e94382263d93a23573db37541_bGlieHNsdC9kb2N1bWVudHMuYw==..a13372393b1ee191b8088a940b5846685dd6712c_bGlieHNsdC9kb2N1bWVudHMuYw== 100644
--- a/libxslt/documents.c
+++ b/libxslt/documents.c
@@ -19,7 +19,9 @@
 #include "documents.h"
 #include "keys.h"
 
-#define DEBUG_DOCUMENTS
+#ifdef WITH_XSLT_DEBUG
+#define WITH_XSLT_DEBUG_DOCUMENTS
+#endif
 
 
 /************************************************************************
diff --git a/libxslt/extensions.c b/libxslt/extensions.c
index e63efa8be9a11f0e94382263d93a23573db37541_bGlieHNsdC9leHRlbnNpb25zLmM=..a13372393b1ee191b8088a940b5846685dd6712c_bGlieHNsdC9leHRlbnNpb25zLmM= 100644
--- a/libxslt/extensions.c
+++ b/libxslt/extensions.c
@@ -23,7 +23,9 @@
 #include "xsltutils.h"
 #include "extensions.h"
 
-#define DEBUG_EXTENSIONS
+#ifdef WITH_XSLT_DEBUG
+#define WITH_XSLT_DEBUG_EXTENSIONS
+#endif
 
 typedef struct _xsltExtDef xsltExtDef;
 typedef xsltExtDef *xsltExtDefPtr;
diff --git a/libxslt/extra.c b/libxslt/extra.c
index e63efa8be9a11f0e94382263d93a23573db37541_bGlieHNsdC9leHRyYS5j..a13372393b1ee191b8088a940b5846685dd6712c_bGlieHNsdC9leHRyYS5j 100644
--- a/libxslt/extra.c
+++ b/libxslt/extra.c
@@ -28,7 +28,9 @@
 #include "transform.h"
 #include "extra.h"
 
-#define DEBUG_EXTRA
+#ifdef WITH_XSLT_DEBUG
+#define WITH_XSLT_DEBUG_EXTRA
+#endif
 
 /************************************************************************
  * 									*
diff --git a/libxslt/functions.c b/libxslt/functions.c
index e63efa8be9a11f0e94382263d93a23573db37541_bGlieHNsdC9mdW5jdGlvbnMuYw==..a13372393b1ee191b8088a940b5846685dd6712c_bGlieHNsdC9mdW5jdGlvbnMuYw== 100644
--- a/libxslt/functions.c
+++ b/libxslt/functions.c
@@ -39,7 +39,9 @@
 #include "keys.h"
 #include "documents.h"
 
-#define DEBUG_FUNCTION
+#ifdef WITH_XSLT_DEBUG
+#define WITH_XSLT_DEBUG_FUNCTION
+#endif
 
 
 /************************************************************************
diff --git a/libxslt/keys.c b/libxslt/keys.c
index e63efa8be9a11f0e94382263d93a23573db37541_bGlieHNsdC9rZXlzLmM=..a13372393b1ee191b8088a940b5846685dd6712c_bGlieHNsdC9rZXlzLmM= 100644
--- a/libxslt/keys.c
+++ b/libxslt/keys.c
@@ -27,7 +27,9 @@
 #include "templates.h"
 #include "keys.h"
 
-#define DEBUG_KEYS
+#ifdef WITH_XSLT_DEBUG
+#define WITH_XSLT_DEBUG_KEYS
+#endif
 
 typedef struct _xsltKeyDef xsltKeyDef;
 typedef xsltKeyDef *xsltKeyDefPtr;
@@ -226,7 +228,7 @@
     if ((style == NULL) || (name == NULL) || (match == NULL) || (use == NULL))
 	return(-1);
 
-#ifdef DEBUG_KEYS
+#ifdef WITH_XSLT_DEBUG_KEYS
     xsltGenericDebug(xsltGenericDebugContext,
 	"Add key %s, match %s, use %s\n", name, match, use);
 #endif
@@ -259,7 +261,7 @@
     if ((ctxt == NULL) || (name == NULL) || (value == NULL))
 	return(NULL);
 
-#ifdef DEBUG_KEYS
+#ifdef WITH_XSLT_DEBUG_KEYS
     xsltGenericDebug(xsltGenericDebugContext,
 	"Get key %s, value %s\n", name, value);
 #endif
@@ -328,10 +330,10 @@
     if (res != NULL) {
 	if (res->type == XPATH_NODESET) {
 	    nodelist = res->nodesetval;
-#ifdef DEBUG_KEYS
+#ifdef WITH_XSLT_DEBUG_KEYS
 	    if (nodelist != NULL)
 		xsltGenericDebug(xsltGenericDebugContext,
 		     "xsltInitCtxtKey: %s evaluates to %d nodes\n",
 				 pattern, nodelist->nodeNr);
 #endif
 	} else {
@@ -332,13 +334,13 @@
 	    if (nodelist != NULL)
 		xsltGenericDebug(xsltGenericDebugContext,
 		     "xsltInitCtxtKey: %s evaluates to %d nodes\n",
 				 pattern, nodelist->nodeNr);
 #endif
 	} else {
-#ifdef DEBUG_KEYS
+#ifdef WITH_XSLT_DEBUG_KEYS
 	    xsltGenericDebug(xsltGenericDebugContext,
 		 "xsltInitCtxtKey: %s is not a node set\n", pattern);
 #endif
 	    goto error;
 	}
     } else {
@@ -339,10 +341,10 @@
 	    xsltGenericDebug(xsltGenericDebugContext,
 		 "xsltInitCtxtKey: %s is not a node set\n", pattern);
 #endif
 	    goto error;
 	}
     } else {
-#ifdef DEBUG_KEYS
+#ifdef WITH_XSLT_DEBUG_KEYS
 	xsltGenericDebug(xsltGenericDebugContext,
 	     "xsltInitCtxtKey: %s evaluation failed\n", pattern);
 #endif
@@ -366,7 +368,7 @@
 	ctxt->node = nodelist->nodeTab[i];
 	str = xsltEvalXPathString(ctxt, comp);
 	if (str != NULL) {
-#ifdef DEBUG_KEYS
+#ifdef WITH_XSLT_DEBUG_KEYS
 	    xsltGenericDebug(xsltGenericDebugContext,
 		 "xsl:key : node associated to(%s,%s)\n",
 		             keyd->name, str);
@@ -380,7 +382,7 @@
 	    }
 	    nodelist->nodeTab[i]->_private = keyd;
 	    xmlFree(str);
-#ifdef DEBUG_KEYS
+#ifdef WITH_XSLT_DEBUG_KEYS
 	} else {
 	    xsltGenericDebug(xsltGenericDebugContext,
 		 "xsl:key : use %s failed to return a string\n",
@@ -415,7 +417,7 @@
 
     if ((ctxt == NULL) || (doc == NULL))
 	return;
-#ifdef DEBUG_KEYS
+#ifdef WITH_XSLT_DEBUG_KEYS
     xsltGenericDebug(xsltGenericDebugContext, "Initializing keys on %s\n",
 		     doc->doc->URL);
 #endif
diff --git a/libxslt/pattern.c b/libxslt/pattern.c
index e63efa8be9a11f0e94382263d93a23573db37541_bGlieHNsdC9wYXR0ZXJuLmM=..a13372393b1ee191b8088a940b5846685dd6712c_bGlieHNsdC9wYXR0ZXJuLmM= 100644
--- a/libxslt/pattern.c
+++ b/libxslt/pattern.c
@@ -32,7 +32,9 @@
 #include "keys.h"
 #include "pattern.h"
 
-#define DEBUG_PATTERN
+#ifdef WITH_XSLT_DEBUG
+#define WITH_XSLT_DEBUG_PATTERN
+#endif
 
 /*
  * Types are private:
@@ -1358,7 +1360,7 @@
 	return(NULL);
     }
 
-#ifdef DEBUG_PATTERN
+#ifdef WITH_XSLT_DEBUG_PATTERN
     xsltGenericDebug(xsltGenericDebugContext,
 		     "xsltCompilePattern : parsing '%s'\n", pattern);
 #endif
@@ -1612,7 +1614,7 @@
 	    xsltFreeCompMatch(pat);
 	    return(-1);
 	}
-#ifdef DEBUG_PATTERN
+#ifdef WITH_XSLT_DEBUG_PATTERN
 	if (mode)
 	    xsltGenericDebug(xsltGenericDebugContext,
 			 "added pattern : '%s' mode '%s' priority %f\n",
diff --git a/libxslt/preproc.c b/libxslt/preproc.c
index e63efa8be9a11f0e94382263d93a23573db37541_bGlieHNsdC9wcmVwcm9jLmM=..a13372393b1ee191b8088a940b5846685dd6712c_bGlieHNsdC9wcmVwcm9jLmM= 100644
--- a/libxslt/preproc.c
+++ b/libxslt/preproc.c
@@ -37,7 +37,9 @@
 #include "extra.h"
 #include "imports.h"
 
-#define DEBUG_PREPROC
+#ifdef WITH_XSLT_DEBUG
+#define WITH_XSLT_DEBUG_PREPROC
+#endif
 
 
 /************************************************************************
@@ -197,7 +199,7 @@
     comp->ver11 = 0;
 
     if (xmlStrEqual(inst->name, (const xmlChar *) "output")) {
-#ifdef DEBUG_EXTRA
+#ifdef WITH_XSLT_DEBUG_EXTRA
 	xsltGenericDebug(xsltGenericDebugContext,
 	    "Found saxon:output extension\n");
 #endif
@@ -205,7 +207,7 @@
 			 (const xmlChar *)"file",
 			 XSLT_SAXON_NAMESPACE, &comp->has_filename);
     } else if (xmlStrEqual(inst->name, (const xmlChar *) "write")) {
-#ifdef DEBUG_EXTRA
+#ifdef WITH_XSLT_DEBUG_EXTRA
 	xsltGenericDebug(xsltGenericDebugContext,
 	    "Found xalan:write extension\n");
 #endif
@@ -217,7 +219,7 @@
 			 (const xmlChar *)"href",
 			 XSLT_XT_NAMESPACE, &comp->has_filename);
 	if (filename == NULL) {
-#ifdef DEBUG_EXTRA
+#ifdef WITH_XSLT_DEBUG_EXTRA
 	    xsltGenericDebug(xsltGenericDebugContext,
 		"Found xslt11:document construct\n");
 #endif
@@ -226,7 +228,7 @@
 			     XSLT_NAMESPACE, &comp->has_filename);
 	    comp->ver11 = 1;
 	} else {
-#ifdef DEBUG_EXTRA
+#ifdef WITH_XSLT_DEBUG_EXTRA
 	    xsltGenericDebug(xsltGenericDebugContext,
 		"Found xt:document extension\n");
 #endif
diff --git a/libxslt/templates.c b/libxslt/templates.c
index e63efa8be9a11f0e94382263d93a23573db37541_bGlieHNsdC90ZW1wbGF0ZXMuYw==..a13372393b1ee191b8088a940b5846685dd6712c_bGlieHNsdC90ZW1wbGF0ZXMuYw== 100644
--- a/libxslt/templates.c
+++ b/libxslt/templates.c
@@ -28,7 +28,9 @@
 #include "namespaces.h"
 #include "attributes.h"
 
-#define DEBUG_TEMPLATES
+#ifdef WITH_XSLT_DEBUG
+#define WITH_XSLT_DEBUG_TEMPLATES
+#endif
 
 /************************************************************************
  *									*
@@ -62,8 +64,8 @@
     if (res != NULL) {
 	ret = xmlXPathEvalPredicate(ctxt->xpathCtxt, res);
 	xmlXPathFreeObject(res);
-#ifdef DEBUG_TEMPLATES
+#ifdef WITH_XSLT_DEBUG_TEMPLATES
 	xsltGenericDebug(xsltGenericDebugContext,
 	     "xsltEvalXPathPredicate: returns %d\n", ret);
 #endif
     } else {
@@ -66,8 +68,8 @@
 	xsltGenericDebug(xsltGenericDebugContext,
 	     "xsltEvalXPathPredicate: returns %d\n", ret);
 #endif
     } else {
-#ifdef DEBUG_TEMPLATES
+#ifdef WITH_XSLT_DEBUG_TEMPLATES
 	xsltGenericDebug(xsltGenericDebugContext,
 	     "xsltEvalXPathPredicate: failed\n");
 #endif
@@ -108,7 +110,7 @@
 	}
 	xmlXPathFreeObject(res);
     }
-#ifdef DEBUG_TEMPLATES
+#ifdef WITH_XSLT_DEBUG_TEMPLATES
     xsltGenericDebug(xsltGenericDebugContext,
 	 "xsltEvalXPathString: returns %s\n", ret);
 #endif
@@ -249,7 +251,7 @@
      */
 
     ret = xsltAttrTemplateValueProcess(ctxt, expr);
-#ifdef DEBUG_TEMPLATES
+#ifdef WITH_XSLT_DEBUG_TEMPLATES
     xsltGenericDebug(xsltGenericDebugContext,
 	 "xsltEvalXPathString: %s returns %s\n", expr, ret);
 #endif
diff --git a/libxslt/transform.c b/libxslt/transform.c
index e63efa8be9a11f0e94382263d93a23573db37541_bGlieHNsdC90cmFuc2Zvcm0uYw==..a13372393b1ee191b8088a940b5846685dd6712c_bGlieHNsdC90cmFuc2Zvcm0uYw== 100644
--- a/libxslt/transform.c
+++ b/libxslt/transform.c
@@ -49,7 +49,9 @@
 #include "extra.h"
 #include "preproc.h"
 
-#define DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG
+#define WITH_XSLT_DEBUG_PROCESS
+#endif
 
 int xsltMaxDepth = 250;
 
@@ -458,7 +460,7 @@
 	    if (template) {
 		xmlNodePtr oldNode;
 
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 		xsltGenericDebug(xsltGenericDebugContext,
 		 "xsltDefaultProcessOneNode: applying template for CDATA %s\n",
 		                 node->content);
@@ -470,7 +472,7 @@
 		templPop(ctxt);
 		ctxt->node = oldNode;
 	    } else /* if (ctxt->mode == NULL) */ {
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 		xsltGenericDebug(xsltGenericDebugContext,
 		 "xsltDefaultProcessOneNode: copy CDATA %s\n",
 		                 node->content);
@@ -489,7 +491,7 @@
 	    if (template) {
 		xmlNodePtr oldNode;
 
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 		xsltGenericDebug(xsltGenericDebugContext,
 		 "xsltDefaultProcessOneNode: applying template for text %s\n",
 		                 node->content);
@@ -501,7 +503,7 @@
 		templPop(ctxt);
 		ctxt->node = oldNode;
 	    } else /* if (ctxt->mode == NULL) */ {
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 		if (node->content == NULL)
 		    xsltGenericDebug(xsltGenericDebugContext,
 		     "xsltDefaultProcessOneNode: copy empty text\n");
@@ -586,7 +588,7 @@
 		nbchild++;
 		break;
 	    default:
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 		xsltGenericDebug(xsltGenericDebugContext,
 		 "xsltDefaultProcessOneNode: skipping node type %d\n",
 		                 cur->type);
@@ -595,7 +597,7 @@
 	}
 	cur = cur->next;
 	if (delete != NULL) {
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 	    xsltGenericDebug(xsltGenericDebugContext,
 		 "xsltDefaultProcessOneNode: removing ignorable blank node\n");
 #endif
@@ -642,7 +644,7 @@
 		if (template) {
 		    xmlNodePtr oldNode;
 
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 		    xsltGenericDebug(xsltGenericDebugContext,
 		 "xsltDefaultProcessOneNode: applying template for CDATA %s\n",
 				     node->content);
@@ -654,7 +656,7 @@
 		    templPop(ctxt);
 		    ctxt->node = oldNode;
 		} else /* if (ctxt->mode == NULL) */ {
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 		    xsltGenericDebug(xsltGenericDebugContext,
 		     "xsltDefaultProcessOneNode: copy CDATA %s\n",
 				     node->content);
@@ -673,7 +675,7 @@
 		if (template) {
 		    xmlNodePtr oldNode;
 
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 		    xsltGenericDebug(xsltGenericDebugContext,
 	     "xsltDefaultProcessOneNode: applying template for text %s\n",
 				     node->content);
@@ -687,7 +689,7 @@
 		    templPop(ctxt);
 		    ctxt->node = oldNode;
 		} else /* if (ctxt->mode == NULL) */ {
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 		    if (cur->content == NULL)
 			xsltGenericDebug(xsltGenericDebugContext,
 			 "xsltDefaultProcessOneNode: copy empty text\n");
@@ -755,7 +757,7 @@
 	    
             cur = cur->next;
 	    if (delete != NULL) {
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 		xsltGenericDebug(xsltGenericDebugContext,
 	     "xsltDefaultProcessOneNode: removing ignorable blank node\n");
 #endif
@@ -771,7 +773,7 @@
      * If no template is found, apply the default rule.
      */
     if (template == NULL) {
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 	if (node->type == XML_DOCUMENT_NODE)
 	    xsltGenericDebug(xsltGenericDebugContext,
 	     "xsltProcessOneNode: no template found for /\n");
@@ -790,7 +792,7 @@
     }
 
     if (node->type == XML_ATTRIBUTE_NODE) {
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 	xsltGenericDebug(xsltGenericDebugContext,
 	     "xsltProcessOneNode: applying template for attribute %s\n",
 	                 node->name);
@@ -799,7 +801,7 @@
 	xsltApplyOneTemplate(ctxt, node, template->content, 1);
 	templPop(ctxt);
     } else {
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 	if (node->type == XML_DOCUMENT_NODE)
 	    xsltGenericDebug(xsltGenericDebugContext,
 	     "xsltProcessOneNode: applying template for /\n");
@@ -864,7 +866,7 @@
 	 * test, we must have a valid insertion point
 	 */
 	if (insert == NULL) {
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 	    xsltGenericDebug(xsltGenericDebugContext,
 		 "xsltApplyOneTemplate: insert == NULL !\n");
 #endif
@@ -904,9 +906,10 @@
 	    }
 	    CHECK_STOPPED;
 	    goto skip_children;
-	} else if (cur->type == XML_TEXT_NODE) {
+	} else if ((cur->type == XML_TEXT_NODE) ||
+		   (cur->type == XML_CDATA_SECTION_NODE)) {
 	    /*
 	     * This text comes from the stylesheet
 	     * For stylesheets, the set of whitespace-preserving
 	     * element names consists of just xsl:text.
 	     */
@@ -908,10 +911,14 @@
 	    /*
 	     * This text comes from the stylesheet
 	     * For stylesheets, the set of whitespace-preserving
 	     * element names consists of just xsl:text.
 	     */
-#ifdef DEBUG_PROCESS
-	    if (cur->name == xmlStringTextNoenc)
+#ifdef WITH_XSLT_DEBUG_PROCESS
+	    if (cur->type == XML_CDATA_SECTION_NODE)
+		xsltGenericDebug(xsltGenericDebugContext,
+		     "xsltApplyOneTemplate: copy CDATA text %s\n",
+		                 cur->content);
+	    else if (cur->name == xmlStringTextNoenc)
 		xsltGenericDebug(xsltGenericDebugContext,
 		     "xsltApplyOneTemplate: copy unescaped text %s\n",
 		                 cur->content);
@@ -919,7 +926,7 @@
 		xsltGenericDebug(xsltGenericDebugContext,
 		     "xsltApplyOneTemplate: copy text %s\n", cur->content);
 #endif
-	    copy = xmlCopyNode(cur, 0);
+	    copy = xmlNewText(cur->content);
 	    if (copy != NULL) {
 		xmlAddChild(insert, copy);
 	    } else {
@@ -939,7 +946,7 @@
 			"xsltApplyOneTemplate: failed to find extension %s\n",
 			         cur->name);
 	    } else {
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 		xsltGenericDebug(xsltGenericDebugContext,
 		 "xsltApplyOneTemplate: extension construct %s\n", cur->name);
 #endif
@@ -954,7 +961,7 @@
 	    }
 	    goto skip_children;
 	} else if (cur->type == XML_ELEMENT_NODE) {
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 	    xsltGenericDebug(xsltGenericDebugContext,
 		 "xsltApplyOneTemplate: copy node %s\n", cur->name);
 #endif
@@ -1044,7 +1051,7 @@
 	xmlChar *base = NULL;
 	xmlChar *URL = NULL;
 	if (xmlStrEqual(inst->name, (const xmlChar *) "output")) {
-#ifdef DEBUG_EXTRA
+#ifdef WITH_XSLT_DEBUG_EXTRA
 	    xsltGenericDebug(xsltGenericDebugContext,
 		"Found saxon:output extension\n");
 #endif
@@ -1052,7 +1059,7 @@
 			     (const xmlChar *)"file",
 			     XSLT_SAXON_NAMESPACE);
 	} else if (xmlStrEqual(inst->name, (const xmlChar *) "write")) {
-#ifdef DEBUG_EXTRA
+#ifdef WITH_XSLT_DEBUG_EXTRA
 	    xsltGenericDebug(xsltGenericDebugContext,
 		"Found xalan:write extension\n");
 #endif
@@ -1064,7 +1071,7 @@
 			     (const xmlChar *)"href",
 			     XSLT_XT_NAMESPACE);
 	    if (filename == NULL) {
-#ifdef DEBUG_EXTRA
+#ifdef WITH_XSLT_DEBUG_EXTRA
 		xsltGenericDebug(xsltGenericDebugContext,
 		    "Found xslt11:document construct\n");
 #endif
@@ -1073,7 +1080,7 @@
 				 XSLT_NAMESPACE);
 		comp->ver11 = 1;
 	    } else {
-#ifdef DEBUG_EXTRA
+#ifdef WITH_XSLT_DEBUG_EXTRA
 		xsltGenericDebug(xsltGenericDebugContext,
 		    "Found xt:document extension\n");
 #endif
@@ -1141,7 +1148,7 @@
 	xsltGenericError(xsltGenericErrorContext,
 	    "xsltDocumentElem: unable to save to %s\n", filename);
     } else {
-#ifdef DEBUG_EXTRA
+#ifdef WITH_XSLT_DEBUG_EXTRA
 	xsltGenericDebug(xsltGenericDebugContext,
 	    "Wrote %d bytes to %s\n", ret, , filename);
 #endif
@@ -1237,7 +1244,7 @@
 		if (res->type == XPATH_NUMBER) {
 		    results[i] = res;
 		} else {
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 		    xsltGenericDebug(xsltGenericDebugContext,
 			"xsltSort: select didn't evaluate to a number\n");
 #endif
@@ -1247,7 +1254,7 @@
 		if (res->type == XPATH_STRING) {
 		    results[i] = res;
 		} else {
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 		    xsltGenericDebug(xsltGenericDebugContext,
 			"xsltSort: select didn't evaluate to a string\n");
 #endif
@@ -1289,7 +1296,7 @@
 	    case XML_HTML_DOCUMENT_NODE:
 		break;
 	    case XML_ELEMENT_NODE:
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 		xsltGenericDebug(xsltGenericDebugContext,
 				 "xsl:copy: node %s\n", node->name);
 #endif
@@ -1300,7 +1307,7 @@
 		}
 		break;
 	    case XML_ATTRIBUTE_NODE: {
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 		xsltGenericDebug(xsltGenericDebugContext,
 				 "xsl:copy: attribute %s\n", node->name);
 #endif
@@ -1363,7 +1370,8 @@
     xmlNodePtr copy;
 
     if (inst->children != NULL) {
-	if ((inst->children->type != XML_TEXT_NODE) ||
+	if (((inst->children->type != XML_TEXT_NODE) &&
+	     (inst->children->type != XML_CDATA_SECTION_NODE)) ||
 	    (inst->children->next != NULL)) {
 	    xsltGenericError(xsltGenericErrorContext,
 		 "xslt:text has content problem !\n");
@@ -1372,7 +1380,7 @@
 	    
 	    copy = xmlNewDocText(ctxt->output, text->content);
 	    if (comp->noescape) {
-#ifdef DEBUG_PARSING
+#ifdef WITH_XSLT_DEBUG_PARSING
 		xsltGenericDebug(xsltGenericDebugContext,
 		     "Disable escaping: %s\n", text->content);
 #endif
@@ -1444,7 +1452,7 @@
 	} else {
 	    if (prefix != NULL) {
 		if (!xmlStrncasecmp(prefix, (xmlChar *)"xml", 3)) {
-#ifdef DEBUG_PARSING
+#ifdef WITH_XSLT_DEBUG_PARSING
 		    xsltGenericDebug(xsltGenericDebugContext,
 			 "xslt:element : xml prefix forbidden\n");
 #endif
@@ -1559,7 +1567,7 @@
 	name = ncname;
     }
     if (!xmlStrncasecmp(prefix, (xmlChar *)"xml", 3)) {
-#ifdef DEBUG_PARSING
+#ifdef WITH_XSLT_DEBUG_PARSING
 	xsltGenericDebug(xsltGenericDebugContext,
 	     "xslt:attribute : xml prefix forbidden\n");
 #endif
@@ -1633,7 +1641,7 @@
     value = xsltEvalTemplateString(ctxt, node, inst);
     /* TODO: use or generate the compiled form */
     /* TODO: check that there is no -- sequence and doesn't end up with - */
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
     if (value == NULL)
 	xsltGenericDebug(xsltGenericDebugContext,
 	     "xsl:comment: empty\n");
@@ -1687,7 +1695,7 @@
 
     value = xsltEvalTemplateString(ctxt, node, inst);
     /* TODO: check that there is no ?> sequence */
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
     if (value == NULL)
 	xsltGenericDebug(xsltGenericDebugContext,
 	     "xsl:processing-instruction: %s empty\n", ncname);
@@ -1734,7 +1742,7 @@
 	if (comp->comp == NULL)
 	    return;
     }
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
     xsltGenericDebug(xsltGenericDebugContext,
 	 "xsltCopyOf: select %s\n", comp->select);
 #endif
@@ -1790,7 +1798,7 @@
 		xsltGenericError(xsltGenericErrorContext,
 		    "xsltCopyOf: text copy failed\n");
 	    }
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 	    else
 		xsltGenericDebug(xsltGenericDebugContext,
 		     "xslcopyOf: result %s\n", res->stringval);
@@ -1829,7 +1837,7 @@
 	    return;
     }
 
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
     xsltGenericDebug(xsltGenericDebugContext,
 	 "xsltValueOf: select %s\n", comp->select);
 #endif
@@ -1858,7 +1866,7 @@
 	xsltGenericError(xsltGenericErrorContext,
 	    "xsltDefaultProcessOneNode: text copy failed\n");
     }
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
     else
 	xsltGenericDebug(xsltGenericDebugContext,
 	     "xsltValueOf: result %s\n", res->stringval);
@@ -2010,7 +2018,7 @@
     if ((ctxt == NULL) || (node == NULL) || (inst == NULL) || (comp == NULL))
 	return;
 
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
     xsltGenericDebug(xsltGenericDebugContext,
 	 "xsltApplyTemplates: node: %s\n", node->name);
 #endif
@@ -2030,7 +2038,7 @@
 	    if (comp->comp == NULL)
 		goto error;
 	}
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 	xsltGenericDebug(xsltGenericDebugContext,
 	     "xsltApplyTemplates: select %s\n", comp->select);
 #endif
@@ -2052,7 +2060,7 @@
 	     }
 	}
 	if (list == NULL) {
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 	    xsltGenericDebug(xsltGenericDebugContext,
 		"xsltApplyTemplates: select didn't evaluate to a node list\n");
 #endif
@@ -2089,7 +2097,7 @@
 		    xmlXPathNodeSetAdd(list, cur);
 		    break;
 		default:
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 		    xsltGenericDebug(xsltGenericDebugContext,
 		     "xsltApplyTemplates: skipping cur type %d\n",
 				     cur->type);
@@ -2098,7 +2106,7 @@
 	    }
 	    cur = cur->next;
 	    if (delete != NULL) {
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 		xsltGenericDebug(xsltGenericDebugContext,
 		     "xsltApplyTemplates: removing ignorable blank cur\n");
 #endif
@@ -2109,7 +2117,7 @@
 	}
     }
 
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
     if (list != NULL)
     xsltGenericDebug(xsltGenericDebugContext,
 	"xsltApplyTemplates: list of %d nodes\n", list->nodeNr);
@@ -2238,7 +2246,7 @@
 		 "xsl:when: test is not defined\n");
 	    return;
 	}
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 	xsltGenericDebug(xsltGenericDebugContext,
 	     "xsl:when: test %s\n", prop);
 #endif
@@ -2261,7 +2269,7 @@
 	    if (res->type == XPATH_BOOLEAN)
 		doit = res->boolval;
 	    else {
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 		xsltGenericDebug(xsltGenericDebugContext,
 		    "xsl:when: test didn't evaluate to a boolean\n");
 #endif
@@ -2269,7 +2277,7 @@
 	    }
 	}
 
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 	xsltGenericDebug(xsltGenericDebugContext,
 	    "xsl:when: test evaluate to %d\n", doit);
 #endif
@@ -2294,7 +2302,7 @@
 	replacement = replacement->next;
     }
     if (replacement != NULL) {
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 	xsltGenericDebug(xsltGenericDebugContext,
 	    "xsl:otherwise: applying default fallback\n");
 #endif
@@ -2342,7 +2350,7 @@
 	    return;
     }
 
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
     xsltGenericDebug(xsltGenericDebugContext,
 	 "xsltIf: test %s\n", comp->test);
 #endif
@@ -2361,7 +2369,7 @@
 	if (res->type == XPATH_BOOLEAN)
 	    doit = res->boolval;
 	else {
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 	    xsltGenericDebug(xsltGenericDebugContext,
 		"xsltIf: test didn't evaluate to a boolean\n");
 #endif
@@ -2369,7 +2377,7 @@
 	}
     }
 
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
     xsltGenericDebug(xsltGenericDebugContext,
 	"xsltIf: test evaluate to %d\n", doit);
 #endif
@@ -2418,7 +2426,7 @@
 	    return;
     }
 
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
     xsltGenericDebug(xsltGenericDebugContext,
 	 "xsltForEach: select %s\n", comp->select);
 #endif
@@ -2436,10 +2444,10 @@
 	    list = res->nodesetval;
     }
     if (list == NULL) {
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
 	xsltGenericDebug(xsltGenericDebugContext,
 	    "xsltForEach: select didn't evaluate to a node list\n");
 #endif
 	goto error;
     }
 
@@ -2440,10 +2448,10 @@
 	xsltGenericDebug(xsltGenericDebugContext,
 	    "xsltForEach: select didn't evaluate to a node list\n");
 #endif
 	goto error;
     }
 
-#ifdef DEBUG_PROCESS
+#ifdef WITH_XSLT_DEBUG_PROCESS
     xsltGenericDebug(xsltGenericDebugContext,
 	"xsltForEach: select evaluate to %d nodes\n", list->nodeNr);
 #endif
diff --git a/libxslt/variables.c b/libxslt/variables.c
index e63efa8be9a11f0e94382263d93a23573db37541_bGlieHNsdC92YXJpYWJsZXMuYw==..a13372393b1ee191b8088a940b5846685dd6712c_bGlieHNsdC92YXJpYWJsZXMuYw== 100644
--- a/libxslt/variables.c
+++ b/libxslt/variables.c
@@ -29,7 +29,9 @@
 #include "transform.h"
 #include "imports.h"
 
-#define DEBUG_VARIABLE
+#ifdef WITH_XSLT_DEBUG
+#define WITH_XSLT_DEBUG_VARIABLE
+#endif
 
 /************************************************************************
  *									*
@@ -248,7 +250,7 @@
     if ((ctxt == NULL) || (elem == NULL))
 	return(-1);
 
-#ifdef DEBUG_VARIABLE
+#ifdef WITH_XSLT_DEBUG_VARIABLE
     xsltGenericDebug(xsltGenericDebugContext,
 	"Evaluating variable %s\n", elem->name);
 #endif
@@ -273,7 +275,7 @@
 	    xsltGenericError(xsltGenericErrorContext,
 		"Evaluating variable %s failed\n", elem->name);
 	} else {
-#ifdef DEBUG_VARIABLE
+#ifdef WITH_XSLT_DEBUG_VARIABLE
 #ifdef LIBXML_DEBUG_ENABLED
 	    if ((xsltGenericDebugContext == stdout) ||
 		(xsltGenericDebugContext == stderr))
@@ -314,7 +316,7 @@
 	    if (elem->value == NULL) {
 		elem->value = xmlXPathNewCString("");
 	    }
-#ifdef DEBUG_VARIABLE
+#ifdef WITH_XSLT_DEBUG_VARIABLE
 #ifdef LIBXML_DEBUG_ENABLED
 	    if ((xsltGenericDebugContext == stdout) ||
 		(xsltGenericDebugContext == stderr))
@@ -345,7 +347,7 @@
     if (ctxt == NULL)
 	return(-1);
  
-#ifdef DEBUG_VARIABLE
+#ifdef WITH_XSLT_DEBUG_VARIABLE
     xsltGenericDebug(xsltGenericDebugContext,
 	"Evaluating global variables\n");
 #endif
@@ -390,7 +392,7 @@
     if (name == NULL)
 	return(-1);
 
-#ifdef DEBUG_VARIABLE
+#ifdef WITH_XSLT_DEBUG_VARIABLE
     if (param)
 	xsltGenericDebug(xsltGenericDebugContext,
 			 "Defining global param %s\n", name);
@@ -449,7 +451,7 @@
 	if ((name == NULL) || (value == NULL))
 	    break;
 
-#ifdef DEBUG_VARIABLE
+#ifdef WITH_XSLT_DEBUG_VARIABLE
 	xsltGenericDebug(xsltGenericDebugContext,
 	    "Evaluating user parameter %s=%s\n", name, value);
 #endif
@@ -505,7 +507,7 @@
     if (name == NULL)
 	return(NULL);
 
-#ifdef DEBUG_VARIABLE
+#ifdef WITH_XSLT_DEBUG_VARIABLE
     xsltGenericDebug(xsltGenericDebugContext,
 		     "Building variable %s", name);
     if (select != NULL)
@@ -560,7 +562,7 @@
 	    xsltGenericError(xsltGenericErrorContext,
 	    "xsl:variable : redefining %s\n", name);
 	}
-#ifdef DEBUG_VARIABLE
+#ifdef WITH_XSLT_DEBUG_VARIABLE
 	else
 	    xsltGenericDebug(xsltGenericDebugContext,
 		     "param %s defined by caller", name);
@@ -615,7 +617,7 @@
 	return(NULL);
 
     if (!elem->computed) {
-#ifdef DEBUG_VARIABLE
+#ifdef WITH_XSLT_DEBUG_VARIABLE
 	xsltGenericDebug(xsltGenericDebugContext,
 		         "uncomputed global variable %s\n", name);
 #endif
@@ -623,7 +625,7 @@
     }
     if (elem->value != NULL)
 	return(xmlXPathObjectCopy(elem->value));
-#ifdef DEBUG_VARIABLE
+#ifdef WITH_XSLT_DEBUG_VARIABLE
     xsltGenericDebug(xsltGenericDebugContext,
 		     "global variable not found %s\n", name);
 #endif
@@ -654,7 +656,7 @@
 	return(xsltGlobalVariableLookup(ctxt, name, ns_uri));
     }
     if (!elem->computed) {
-#ifdef DEBUG_VARIABLE
+#ifdef WITH_XSLT_DEBUG_VARIABLE
 	xsltGenericDebug(xsltGenericDebugContext,
 		         "uncomputed variable %s\n", name);
 #endif
@@ -662,7 +664,7 @@
     }
     if (elem->value != NULL)
 	return(xmlXPathObjectCopy(elem->value));
-#ifdef DEBUG_VARIABLE
+#ifdef WITH_XSLT_DEBUG_VARIABLE
     xsltGenericDebug(xsltGenericDebugContext,
 		     "variable not found %s\n", name);
 #endif
@@ -697,7 +699,7 @@
 	return(NULL);
     }
 
-#ifdef DEBUG_VARIABLE
+#ifdef WITH_XSLT_DEBUG_VARIABLE
     xsltGenericDebug(xsltGenericDebugContext,
 	"Parsing param %s\n", name);
 #endif
@@ -706,7 +708,7 @@
     if (select == NULL) {
 	tree = cur->children;
     } else {
-#ifdef DEBUG_VARIABLE
+#ifdef WITH_XSLT_DEBUG_VARIABLE
 	xsltGenericDebug(xsltGenericDebugContext,
 	    "        select %s\n", select);
 #endif
@@ -769,7 +771,7 @@
 	return;
     }
 
-#ifdef DEBUG_VARIABLE
+#ifdef WITH_XSLT_DEBUG_VARIABLE
     xsltGenericDebug(xsltGenericDebugContext,
 	"Parsing param %s\n", name);
 #endif
@@ -778,7 +780,7 @@
     if (select == NULL) {
 	tree = cur->children;
     } else {
-#ifdef DEBUG_VARIABLE
+#ifdef WITH_XSLT_DEBUG_VARIABLE
 	xsltGenericDebug(xsltGenericDebugContext,
 	    "        select %s\n", select);
 #endif
@@ -840,7 +842,7 @@
 	return;
     }
 
-#ifdef DEBUG_VARIABLE
+#ifdef WITH_XSLT_DEBUG_VARIABLE
     xsltGenericDebug(xsltGenericDebugContext,
 	"Parsing global variable %s\n", name);
 #endif
@@ -909,7 +911,7 @@
 	return;
     }
 
-#ifdef DEBUG_VARIABLE
+#ifdef WITH_XSLT_DEBUG_VARIABLE
     xsltGenericDebug(xsltGenericDebugContext,
 	"Parsing global param %s\n", name);
 #endif
@@ -977,7 +979,7 @@
 	return;
     }
 
-#ifdef DEBUG_VARIABLE
+#ifdef WITH_XSLT_DEBUG_VARIABLE
     xsltGenericDebug(xsltGenericDebugContext,
 	"Parsing variable %s\n", name);
 #endif
@@ -1039,7 +1041,7 @@
     if ((ctxt == NULL) || (name == NULL))
 	return(NULL);
 
-#ifdef DEBUG_VARIABLE
+#ifdef WITH_XSLT_DEBUG_VARIABLE
     xsltGenericDebug(xsltGenericDebugContext,
 	    "Lookup variable %s\n", name);
 #endif
@@ -1049,7 +1051,7 @@
 	xsltGenericError(xsltGenericErrorContext,
 	    "unregistered variable %s\n", name);
     }
-#ifdef DEBUG_VARIABLE
+#ifdef WITH_XSLT_DEBUG_VARIABLE
     if (ret != NULL)
 	xsltGenericDebug(xsltGenericDebugContext,
 	    "found variable %s\n", name);
diff --git a/libxslt/xslt.c b/libxslt/xslt.c
index e63efa8be9a11f0e94382263d93a23573db37541_bGlieHNsdC94c2x0LmM=..a13372393b1ee191b8088a940b5846685dd6712c_bGlieHNsdC94c2x0LmM= 100644
--- a/libxslt/xslt.c
+++ b/libxslt/xslt.c
@@ -33,8 +33,10 @@
 #include "documents.h"
 #include "extensions.h"
 
-#define DEBUG_PARSING
-/* #define DEBUG_BLANKS */
+#ifdef WITH_XSLT_DEBUG
+#define WITH_XSLT_DEBUG_PARSING
+/* #define WITH_XSLT_DEBUG_BLANKS */
+#endif
 
 /*
  * Useful macros
@@ -466,7 +468,7 @@
 	    while ((*end != 0) && (!IS_BLANK(*end))) end++;
 	    element = xmlStrndup(element, end - element);
 	    if (element) {
-#ifdef DEBUG_PARSING
+#ifdef WITH_XSLT_DEBUG_PARSING
 		xsltGenericDebug(xsltGenericDebugContext,
 		    "add cdata section output element %s\n", element);
 #endif
@@ -620,7 +622,7 @@
 	while ((*end != 0) && (!IS_BLANK(*end))) end++;
 	element = xmlStrndup(element, end - element);
 	if (element) {
-#ifdef DEBUG_PARSING
+#ifdef WITH_XSLT_DEBUG_PARSING
 	    xsltGenericDebug(xsltGenericDebugContext,
 		"add preserved space element %s\n", element);
 #endif
@@ -680,7 +682,7 @@
 	    "xsl:extension-element-prefix : undefined namespace %s\n",
 	                         prefix);
 	    } else {
-#ifdef DEBUG_PARSING
+#ifdef WITH_XSLT_DEBUG_PARSING
 		xsltGenericDebug(xsltGenericDebugContext,
 		    "add extension prefix %s\n", prefix);
 #endif
@@ -731,7 +733,7 @@
 	while ((*end != 0) && (!IS_BLANK(*end))) end++;
 	element = xmlStrndup(element, end - element);
 	if (element) {
-#ifdef DEBUG_PARSING
+#ifdef WITH_XSLT_DEBUG_PARSING
 	    xsltGenericDebug(xsltGenericDebugContext,
 		"add stripped space element %s\n", element);
 #endif
@@ -771,7 +773,7 @@
     delete = NULL;
     while (cur != NULL) {
 	if (delete != NULL) {
-#ifdef DEBUG_BLANKS
+#ifdef WITH_XSLT_DEBUG_BLANKS
 	    xsltGenericDebug(xsltGenericDebugContext,
 	     "xsltParseRemoveBlanks: removing ignorable blank node\n");
 #endif
@@ -823,7 +825,7 @@
 	} while (cur != NULL);
     }
     if (delete != NULL) {
-#ifdef DEBUG_PARSING
+#ifdef WITH_XSLT_DEBUG_PARSING
 	xsltGenericDebug(xsltGenericDebugContext,
 	 "xsltParseRemoveBlanks: removing ignorable blank node\n");
 #endif
@@ -873,7 +875,7 @@
 			xmlHashUpdateEntry(style->nsHash, ns->prefix,
 			    (void *) ns->href, (xmlHashDeallocator)xmlFree);
 
-#ifdef DEBUG_PARSING
+#ifdef WITH_XSLT_DEBUG_PARSING
 			xsltGenericDebug(xsltGenericDebugContext,
 		 "Added namespace: %s mapped to %s\n", ns->prefix, ns->href);
 #endif
@@ -938,7 +940,7 @@
     delete = NULL;
     while (cur != NULL) {
 	if (delete != NULL) {
-#ifdef DEBUG_BLANKS
+#ifdef WITH_XSLT_DEBUG_BLANKS
 	    xsltGenericDebug(xsltGenericDebugContext,
 	     "xsltParseTemplateContent: removing text\n");
 #endif
@@ -949,6 +951,7 @@
 	if (IS_XSLT_ELEM(cur)) {
 	    if (IS_XSLT_NAME(cur, "text")) {
 		if (cur->children != NULL) {
-		    if ((cur->children->type != XML_TEXT_NODE) ||
+		    if (((cur->children->type != XML_TEXT_NODE) &&
+			 (cur->children->type != XML_CDATA_SECTION_NODE)) ||
 			(cur->children->next != NULL)) {
 			xsltGenericError(xsltGenericErrorContext,
@@ -953,6 +956,6 @@
 			(cur->children->next != NULL)) {
 			xsltGenericError(xsltGenericErrorContext,
-	     "xsltParseStylesheetTemplate: xslt:text content problem\n");
+	     "xsltParseTemplateContent: xslt:text content problem\n");
 		    } else {
 			xmlChar *prop;
 			xmlNodePtr text = cur->children;
@@ -961,7 +964,7 @@
 				(const xmlChar *)"disable-output-escaping",
 				            XSLT_NAMESPACE);
 			if (prop != NULL) {
-#ifdef DEBUG_PARSING
+#ifdef WITH_XSLT_DEBUG_PARSING
 			    xsltGenericDebug(xsltGenericDebugContext,
 				 "Disable escaping: %s\n", text->content);
 #endif
@@ -1021,7 +1024,7 @@
 	} while (cur != NULL);
     }
     if (delete != NULL) {
-#ifdef DEBUG_PARSING
+#ifdef WITH_XSLT_DEBUG_PARSING
 	xsltGenericDebug(xsltGenericDebugContext,
 	 "xsltParseStylesheetTemplate: removing text\n");
 #endif
@@ -1113,7 +1116,7 @@
 	    name = prop;
 	    nameURI = NULL;
 	}
-#ifdef DEBUG_PARSING
+#ifdef WITH_XSLT_DEBUG_PARSING
 	xsltGenericDebug(xsltGenericDebugContext,
 	     "xslt:key: name %s\n", name);
 #endif
@@ -1215,7 +1218,7 @@
 	    mode = prop;
 	    modeURI = NULL;
 	}
-#ifdef DEBUG_PARSING
+#ifdef WITH_XSLT_DEBUG_PARSING
 	xsltGenericDebug(xsltGenericDebugContext,
 	     "xslt:template: mode %s\n", mode);
 #endif
@@ -1297,7 +1300,7 @@
 xsltParseStylesheetTop(xsltStylesheetPtr style, xmlNodePtr top) {
     xmlNodePtr cur;
     xmlChar *prop;
-#ifdef DEBUG_PARSING
+#ifdef WITH_XSLT_DEBUG_PARSING
     int templates = 0;
 #endif
 
@@ -1327,7 +1330,7 @@
 	    continue;
 	}
 	if (!(IS_XSLT_ELEM(cur))) {
-#ifdef DEBUG_PARSING
+#ifdef WITH_XSLT_DEBUG_PARSING
 	    xsltGenericDebug(xsltGenericDebugContext,
 		    "xsltParseStylesheetTop : found foreign element %s\n",
 		    cur->name);
@@ -1343,7 +1346,7 @@
     }
     while (cur != NULL) {
 	if (!(IS_XSLT_ELEM(cur))) {
-#ifdef DEBUG_PARSING
+#ifdef WITH_XSLT_DEBUG_PARSING
 	    xsltGenericDebug(xsltGenericDebugContext,
 		    "xsltParseStylesheetTop : found foreign element %s\n",
 		    cur->name);
@@ -1373,7 +1376,7 @@
         } else if (IS_XSLT_NAME(cur, "param")) {
 	    xsltParseGlobalParam(style, cur);
         } else if (IS_XSLT_NAME(cur, "template")) {
-#ifdef DEBUG_PARSING
+#ifdef WITH_XSLT_DEBUG_PARSING
 	    templates++;
 #endif
 	    xsltParseStylesheetTemplate(style, cur);
@@ -1386,7 +1389,7 @@
 	}
 	cur = cur->next;
     }
-#ifdef DEBUG_PARSING
+#ifdef WITH_XSLT_DEBUG_PARSING
     xsltGenericDebug(xsltGenericDebugContext,
 		    "parsed %d templates\n", templates);
 #endif
@@ -1428,7 +1431,7 @@
     if ((IS_XSLT_ELEM(cur)) && 
 	((IS_XSLT_NAME(cur, "stylesheet")) ||
 	 (IS_XSLT_NAME(cur, "transform")))) {
-#ifdef DEBUG_PARSING
+#ifdef WITH_XSLT_DEBUG_PARSING
 	xsltGenericDebug(xsltGenericDebugContext,
 		"xsltParseStylesheetProcess : found stylesheet\n");
 #endif
@@ -1449,7 +1452,7 @@
 	    return(NULL);
 	}
 
-#ifdef DEBUG_PARSING
+#ifdef WITH_XSLT_DEBUG_PARSING
         xsltGenericDebug(xsltGenericDebugContext,
 		"xsltParseStylesheetProcess : document is stylesheet\n");
 #endif
@@ -1528,7 +1531,7 @@
     if (filename == NULL)
 	return(NULL);
 
-#ifdef DEBUG_PARSING
+#ifdef WITH_XSLT_DEBUG_PARSING
     xsltGenericDebug(xsltGenericDebugContext,
 	    "xsltParseStylesheetFile : parse %s\n", filename);
 #endif
diff --git a/libxslt/xsltconfig.h.in b/libxslt/xsltconfig.h.in
index e63efa8be9a11f0e94382263d93a23573db37541_bGlieHNsdC94c2x0Y29uZmlnLmguaW4=..a13372393b1ee191b8088a940b5846685dd6712c_bGlieHNsdC94c2x0Y29uZmlnLmguaW4= 100644
--- a/libxslt/xsltconfig.h.in
+++ b/libxslt/xsltconfig.h.in
@@ -15,6 +15,10 @@
 extern "C" {
 #endif
 
+#if @WITH_XSLT_DEBUG@
+#define WITH_XSLT_DEBUG
+#endif
+
 #if @WITH_MEM_DEBUG@
 #define DEBUG_MEMORY
 #define DEBUG_MEMORY_LOCATION
diff --git a/tests/XSLTMark/metric.out b/tests/XSLTMark/metric.out
index e63efa8be9a11f0e94382263d93a23573db37541_dGVzdHMvWFNMVE1hcmsvbWV0cmljLm91dA==..a13372393b1ee191b8088a940b5846685dd6712c_dGVzdHMvWFNMVE1hcmsvbWV0cmljLm91dA== 100644
--- a/tests/XSLTMark/metric.out
+++ b/tests/XSLTMark/metric.out
@@ -1,5 +1,5 @@
 <!DOCTYPE HTML PUBLIC "http://www.w3.org/TR/REC-html40/loose.dtd" "-//W3C//DTD HTML 4.0 Transitional//EN">
 
   <measurement unit="in">12362180</measurement>
-  <measurement unit="ft">521.647199999</measurement>
+  <measurement unit="ft">521.6472</measurement>
   <measurement unit="yd">276683.33</measurement>
@@ -5,4 +5,4 @@
   <measurement unit="yd">276683.33</measurement>
-  <measurement unit="mi">0.000136701399</measurement>
-  <measurement unit="in">1.275587996</measurement>
+  <measurement unit="mi">0.0001367014</measurement>
+  <measurement unit="in">1.275588</measurement>
   <measurement unit="ft">1332004.8</measurement>
@@ -8,5 +8,5 @@
   <measurement unit="ft">1332004.8</measurement>
-  <measurement unit="yd">95012.388419899</measurement>
+  <measurement unit="yd">95012.3884199</measurement>
   <measurement unit="mi">0.00250598521</measurement>
   <measurement unit="in">39370</measurement>
   <measurement unit="ft">8.612395272</measurement>
@@ -10,7 +10,7 @@
   <measurement unit="mi">0.00250598521</measurement>
   <measurement unit="in">39370</measurement>
   <measurement unit="ft">8.612395272</measurement>
-  <measurement unit="yd">0.0470252298</measurement>
-  <measurement unit="mi">0.0000893530059</measurement>
+  <measurement unit="yd">0.04702523</measurement>
+  <measurement unit="mi">0.000089353006</measurement>
   <measurement unit="in">3031490</measurement>
 
diff --git a/tests/docs/bug-9-.xml b/tests/docs/bug-9-.xml
new file mode 100644
index 0000000000000000000000000000000000000000..a13372393b1ee191b8088a940b5846685dd6712c_dGVzdHMvZG9jcy9idWctOS0ueG1s
--- /dev/null
+++ b/tests/docs/bug-9-.xml
@@ -0,0 +1,3 @@
+<?xml version= "1.0"?>
+<doc/>
+
diff --git a/tests/general/bug-5-.out b/tests/general/bug-5-.out
index e63efa8be9a11f0e94382263d93a23573db37541_dGVzdHMvZ2VuZXJhbC9idWctNS0ub3V0..a13372393b1ee191b8088a940b5846685dd6712c_dGVzdHMvZ2VuZXJhbC9idWctNS0ub3V0 100644
--- a/tests/general/bug-5-.out
+++ b/tests/general/bug-5-.out
@@ -29,5 +29,5 @@
 PROD
 "/><tr class="
 PROD
-"><td>Orange</td><td>Proj. Rev: 1743250</td><td>Actual Rev: 10695.229999999</td></tr><tr class="
+"><td>Orange</td><td>Proj. Rev: 1743250</td><td>Actual Rev: 10695.23</td></tr><tr class="
 ACT
@@ -33,5 +33,5 @@
 ACT
-"><td>PICK</td><td>Proj. Rev: 1159000</td><td>Act. Rev: 9964.479999999</td></tr><tr><td valign="top"><table><tr class="NR"><td>Non-Recurring</td><td>Number: 229</td><td>Proj. Rev: 0</td><td>Act. Rev: 8300</td></tr><tr><td>Segment</td><td>Number</td><td>Proj. Rev</td><td>Act. Rev</td></tr><tr><td>Pine</td><td>34</td><td>0</td><td>1420</td></tr><tr><td>Almond</td><td>1</td><td>0</td><td>25</td></tr><tr><td>Birch</td><td>8</td><td>0</td><td>300</td></tr><tr><td>Elm</td><td>186</td><td>0</td><td>6555</td></tr><tr class="NR"/></table></td><td valign="top"><table><tr class="RC"><td>Recurring</td><td>Number: 284</td><td>Proj. Rev: 1159000</td><td>Act. Rev: 1664.479999999</td></tr><tr><td>Segment</td><td>Number</td><td>Proj. Rev</td><td>Act. Rev</td></tr><tr><td>Pine</td><td>36</td><td>171000</td><td>221.3</td></tr><tr><td>Elm</td><td>240</td><td>950000</td><td>1412.34</td></tr><tr><td>Birch</td><td>8</td><td>38000</td><td>30.84</td></tr><tr class="RC"/></table></td></tr><tr class="
+"><td>PICK</td><td>Proj. Rev: 1159000</td><td>Act. Rev: 9964.48</td></tr><tr><td valign="top"><table><tr class="NR"><td>Non-Recurring</td><td>Number: 229</td><td>Proj. Rev: 0</td><td>Act. Rev: 8300</td></tr><tr><td>Segment</td><td>Number</td><td>Proj. Rev</td><td>Act. Rev</td></tr><tr><td>Pine</td><td>34</td><td>0</td><td>1420</td></tr><tr><td>Almond</td><td>1</td><td>0</td><td>25</td></tr><tr><td>Birch</td><td>8</td><td>0</td><td>300</td></tr><tr><td>Elm</td><td>186</td><td>0</td><td>6555</td></tr><tr class="NR"/></table></td><td valign="top"><table><tr class="RC"><td>Recurring</td><td>Number: 284</td><td>Proj. Rev: 1159000</td><td>Act. Rev: 1664.48</td></tr><tr><td>Segment</td><td>Number</td><td>Proj. Rev</td><td>Act. Rev</td></tr><tr><td>Pine</td><td>36</td><td>171000</td><td>221.3</td></tr><tr><td>Elm</td><td>240</td><td>950000</td><td>1412.34</td></tr><tr><td>Birch</td><td>8</td><td>38000</td><td>30.84</td></tr><tr class="RC"/></table></td></tr><tr class="
 ACT
 "/><tr class="
 ACT
@@ -39,7 +39,7 @@
 ACT
 "/><tr class="
 ACT
-"><td>SQUEEZE</td><td>Proj. Rev: 584250</td><td>Act. Rev: 730.749999999</td></tr><tr><td valign="top"/><td valign="top"><table><tr class="RC"><td>Recurring</td><td>Number: 123</td><td>Proj. Rev: 584250</td><td>Act. Rev: 730.749999999</td></tr><tr><td>Segment</td><td>Number</td><td>Proj. Rev</td><td>Act. Rev</td></tr><tr><td>Pine</td><td>36</td><td>171000</td><td>221.3</td></tr><tr><td>Elm</td><td>80</td><td>380000</td><td>470.78</td></tr><tr><td>Birch</td><td>4</td><td>19000</td><td>15.42</td></tr><tr><td>Almond</td><td>3</td><td>14250</td><td>23.25</td></tr><tr class="RC"/></table></td></tr><tr class="
+"><td>SQUEEZE</td><td>Proj. Rev: 584250</td><td>Act. Rev: 730.75</td></tr><tr><td valign="top"/><td valign="top"><table><tr class="RC"><td>Recurring</td><td>Number: 123</td><td>Proj. Rev: 584250</td><td>Act. Rev: 730.75</td></tr><tr><td>Segment</td><td>Number</td><td>Proj. Rev</td><td>Act. Rev</td></tr><tr><td>Pine</td><td>36</td><td>171000</td><td>221.3</td></tr><tr><td>Elm</td><td>80</td><td>380000</td><td>470.78</td></tr><tr><td>Birch</td><td>4</td><td>19000</td><td>15.42</td></tr><tr><td>Almond</td><td>3</td><td>14250</td><td>23.25</td></tr><tr class="RC"/></table></td></tr><tr class="
 ACT
 "/><tr class="
 PROD
@@ -65,7 +65,7 @@
 PROD
 "/><tr class="
 PROD
-"><td>Pineapple</td><td>Proj. Rev: 36250</td><td>Actual Rev: 73.129999999</td></tr><tr class="
+"><td>Pineapple</td><td>Proj. Rev: 36250</td><td>Actual Rev: 73.13</td></tr><tr class="
 ACT
 "><td>PICK</td><td>Proj. Rev: 23750</td><td>Act. Rev: 68.75</td></tr><tr><td valign="top"><table><tr class="NR"><td>Non-Recurring</td><td>Number: 1</td><td>Proj. Rev: 0</td><td>Act. Rev: 50</td></tr><tr><td>Segment</td><td>Number</td><td>Proj. Rev</td><td>Act. Rev</td></tr><tr><td>Pine</td><td>1</td><td>0</td><td>50</td></tr><tr class="NR"/></table></td><td valign="top"><table><tr class="RC"><td>Recurring</td><td>Number: 3</td><td>Proj. Rev: 23750</td><td>Act. Rev: 18.75</td></tr><tr><td>Segment</td><td>Number</td><td>Proj. Rev</td><td>Act. Rev</td></tr><tr><td>Pine</td><td>2</td><td>17500</td><td>8.75</td></tr><tr><td>Birch</td><td>1</td><td>6250</td><td>10</td></tr><tr class="RC"/></table></td></tr><tr class="
 ACT
@@ -75,7 +75,7 @@
 ACT
 "/><tr class="
 ACT
-"><td>SQUEEZE</td><td>Proj. Rev: 12500</td><td>Act. Rev: 4.379999999</td></tr><tr><td valign="top"/><td valign="top"><table><tr class="RC"><td>Recurring</td><td>Number: 2</td><td>Proj. Rev: 12500</td><td>Act. Rev: 4.379999999</td></tr><tr><td>Segment</td><td>Number</td><td>Proj. Rev</td><td>Act. Rev</td></tr><tr><td>Elm</td><td>2</td><td>12500</td><td>4.38</td></tr><tr class="RC"/></table></td></tr><tr class="
+"><td>SQUEEZE</td><td>Proj. Rev: 12500</td><td>Act. Rev: 4.38</td></tr><tr><td valign="top"/><td valign="top"><table><tr class="RC"><td>Recurring</td><td>Number: 2</td><td>Proj. Rev: 12500</td><td>Act. Rev: 4.38</td></tr><tr><td>Segment</td><td>Number</td><td>Proj. Rev</td><td>Act. Rev</td></tr><tr><td>Elm</td><td>2</td><td>12500</td><td>4.38</td></tr><tr class="RC"/></table></td></tr><tr class="
 ACT
 "/><tr class="
 PROD
@@ -89,5 +89,5 @@
 PROD
 "/><tr class="
 PROD
-"><td>Guava</td><td>Proj. Rev: 14995</td><td>Actual Rev: -19.489999999</td></tr><tr class="
+"><td>Guava</td><td>Proj. Rev: 14995</td><td>Actual Rev: -19.49</td></tr><tr class="
 ACT
@@ -93,5 +93,5 @@
 ACT
-"><td>SQUEEZE</td><td>Proj. Rev: 14995</td><td>Act. Rev: -19.489999999</td></tr><tr><td valign="top"/><td valign="top"><table><tr class="RC"><td>Recurring</td><td>Number: 1</td><td>Proj. Rev: 14995</td><td>Act. Rev: -19.489999999</td></tr><tr><td>Segment</td><td>Number</td><td>Proj. Rev</td><td>Act. Rev</td></tr><tr><td>Pine</td><td>1</td><td>14995</td><td>-19.49</td></tr><tr class="RC"/></table></td></tr><tr class="
+"><td>SQUEEZE</td><td>Proj. Rev: 14995</td><td>Act. Rev: -19.49</td></tr><tr><td valign="top"/><td valign="top"><table><tr class="RC"><td>Recurring</td><td>Number: 1</td><td>Proj. Rev: 14995</td><td>Act. Rev: -19.49</td></tr><tr><td>Segment</td><td>Number</td><td>Proj. Rev</td><td>Act. Rev</td></tr><tr><td>Pine</td><td>1</td><td>14995</td><td>-19.49</td></tr><tr class="RC"/></table></td></tr><tr class="
 ACT
 "/><tr class="
 PROD
@@ -105,9 +105,9 @@
 PROD
 "/><tr class="
 PROD
-"><td>Raisin</td><td>Proj. Rev: 299925</td><td>Actual Rev: 227.949999999</td></tr><tr class="
+"><td>Raisin</td><td>Proj. Rev: 299925</td><td>Actual Rev: 227.95</td></tr><tr class="
 ACT
 "><td>EAT</td><td>Proj. Rev: 0</td><td>Act. Rev: 0</td></tr><tr><td valign="top"><table><tr class="NR"><td>Non-Recurring</td><td>Number: 17</td><td>Proj. Rev: 0</td><td>Act. Rev: 0</td></tr><tr><td>Segment</td><td>Number</td><td>Proj. Rev</td><td>Act. Rev</td></tr><tr><td>Oak</td><td>17</td><td>0</td><td>0</td></tr><tr class="NR"/></table></td><td valign="top"/></tr><tr class="
 ACT
 "/><tr class="
 ACT
@@ -109,9 +109,9 @@
 ACT
 "><td>EAT</td><td>Proj. Rev: 0</td><td>Act. Rev: 0</td></tr><tr><td valign="top"><table><tr class="NR"><td>Non-Recurring</td><td>Number: 17</td><td>Proj. Rev: 0</td><td>Act. Rev: 0</td></tr><tr><td>Segment</td><td>Number</td><td>Proj. Rev</td><td>Act. Rev</td></tr><tr><td>Oak</td><td>17</td><td>0</td><td>0</td></tr><tr class="NR"/></table></td><td valign="top"/></tr><tr class="
 ACT
 "/><tr class="
 ACT
-"><td>SQUEEZE</td><td>Proj. Rev: 299925</td><td>Act. Rev: 227.949999999</td></tr><tr><td valign="top"/><td valign="top"><table><tr class="RC"><td>Recurring</td><td>Number: 15</td><td>Proj. Rev: 299925</td><td>Act. Rev: 227.949999999</td></tr><tr><td>Segment</td><td>Number</td><td>Proj. Rev</td><td>Act. Rev</td></tr><tr><td>Oak</td><td>15</td><td>299925</td><td>227.95</td></tr><tr class="RC"/></table></td></tr><tr class="
+"><td>SQUEEZE</td><td>Proj. Rev: 299925</td><td>Act. Rev: 227.95</td></tr><tr><td valign="top"/><td valign="top"><table><tr class="RC"><td>Recurring</td><td>Number: 15</td><td>Proj. Rev: 299925</td><td>Act. Rev: 227.95</td></tr><tr><td>Segment</td><td>Number</td><td>Proj. Rev</td><td>Act. Rev</td></tr><tr><td>Oak</td><td>15</td><td>299925</td><td>227.95</td></tr><tr class="RC"/></table></td></tr><tr class="
 ACT
 "/><tr class="
 PROD
@@ -119,7 +119,7 @@
 PROD
 "><td>Fig</td><td>Proj. Rev: 74990</td><td>Actual Rev: 136.24</td></tr><tr class="
 ACT
-"><td>PICK</td><td>Proj. Rev: 74990</td><td>Act. Rev: 136.24</td></tr><tr><td valign="top"><table><tr class="NR"><td>Non-Recurring</td><td>Number: 1</td><td>Proj. Rev: 0</td><td>Act. Rev: 50</td></tr><tr><td>Segment</td><td>Number</td><td>Proj. Rev</td><td>Act. Rev</td></tr><tr><td>Oak</td><td>1</td><td>0</td><td>50</td></tr><tr class="NR"/></table></td><td valign="top"><table><tr class="RC"><td>Recurring</td><td>Number: 2</td><td>Proj. Rev: 74990</td><td>Act. Rev: 86.239999999</td></tr><tr><td>Segment</td><td>Number</td><td>Proj. Rev</td><td>Act. Rev</td></tr><tr><td>Oak</td><td>2</td><td>74990</td><td>86.24</td></tr><tr class="RC"/></table></td></tr><tr class="
+"><td>PICK</td><td>Proj. Rev: 74990</td><td>Act. Rev: 136.24</td></tr><tr><td valign="top"><table><tr class="NR"><td>Non-Recurring</td><td>Number: 1</td><td>Proj. Rev: 0</td><td>Act. Rev: 50</td></tr><tr><td>Segment</td><td>Number</td><td>Proj. Rev</td><td>Act. Rev</td></tr><tr><td>Oak</td><td>1</td><td>0</td><td>50</td></tr><tr class="NR"/></table></td><td valign="top"><table><tr class="RC"><td>Recurring</td><td>Number: 2</td><td>Proj. Rev: 74990</td><td>Act. Rev: 86.24</td></tr><tr><td>Segment</td><td>Number</td><td>Proj. Rev</td><td>Act. Rev</td></tr><tr><td>Oak</td><td>2</td><td>74990</td><td>86.24</td></tr><tr class="RC"/></table></td></tr><tr class="
 ACT
 "/><tr class="
 PROD
diff --git a/tests/general/bug-9-.xsl b/tests/general/bug-9-.xsl
new file mode 100644
index 0000000000000000000000000000000000000000..a13372393b1ee191b8088a940b5846685dd6712c_dGVzdHMvZ2VuZXJhbC9idWctOS0ueHNs
--- /dev/null
+++ b/tests/general/bug-9-.xsl
@@ -0,0 +1,10 @@
+<?xml version= "1.0"?>
+                            
+<xsl:stylesheet version="1.0" 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  
+<xsl:template match="/">
+<xsl:processing-instruction name="php">Success</xsl:processing-instruction>
+</xsl:template>
+  
+</xsl:stylesheet>