--- xalan-1.10.orig/c/Makefile.in
+++ xalan-1.10/c/Makefile.in
@@ -31,6 +31,9 @@
 Samples: 
 	$(MAKE) -C samples $@
 
+ApacheModuleXSLT:
+	$(MAKE) -C samples $@
+
 tests: 
 	$(MAKE) -C Tests $@
 
--- xalan-1.10.orig/c/configure
+++ xalan-1.10/c/configure
@@ -914,7 +914,7 @@
     else
       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
     fi
-    cd $ac_popdir
+    cd "$ac_popdir"
   done
 fi
 
@@ -1261,6 +1261,8 @@
 
 
 
+          ac_config_headers="$ac_config_headers src/xalanc/Include/xalan-config.h"
+
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -1830,8 +1832,7 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -1889,8 +1890,7 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -2006,8 +2006,7 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -2061,8 +2060,7 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -2107,8 +2105,7 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -2152,8 +2149,7 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -2337,8 +2333,7 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_cxx_werror_flag"
-			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -2396,8 +2391,7 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_cxx_werror_flag"
-			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -2468,8 +2462,7 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_cxx_werror_flag"
-			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -2513,8 +2506,7 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_cxx_werror_flag"
-			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -2730,8 +2722,7 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_cxx_werror_flag"
-			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -2816,6 +2807,7 @@
 case "${host}" in
         *-*-solaris*)   platform=SOLARIS ;;
         *-*-linux*)     platform=LINUX ;;
+        *-*-k*bsd*)     platform=LINUX ;;
         *-*-freebsd*)   platform=FREEBSD ;;
         *-*-netbsd*)    platform=NETBSD ;;
         *-*-irix*)      platform=IRIX ;;
@@ -2876,8 +2868,7 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_cxx_werror_flag"
-			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -3192,8 +3183,7 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_cxx_werror_flag"
-			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -3394,8 +3384,7 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_cxx_werror_flag"
-			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -3609,38 +3598,7 @@
 }'
 fi
 
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-#
-# If the first sed substitution is executed (which looks for macros that
-# take arguments), then we branch to the quote section.  Otherwise,
-# look for a macro that doesn't take arguments.
-cat >confdef2opt.sed <<\_ACEOF
-t clear
-: clear
-s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\),-D\1=\2,g
-t quote
-s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\),-D\1=\2,g
-t quote
-d
-: quote
-s,[	 `~#$^&*(){}\\|;'"<>?],\\&,g
-s,\[,\\&,g
-s,\],\\&,g
-s,\$,$$,g
-p
-_ACEOF
-# We use echo to avoid assuming a particular line-breaking character.
-# The extra dot is to prevent the shell from consuming trailing
-# line-breaks from the sub-command output.  A line-break within
-# single-quotes doesn't work because, if this script is created in a
-# platform that uses two characters for line-breaks (e.g., DOS), tr
-# would break.
-ac_LF_and_DOT=`echo; echo .`
-DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
-rm -f confdef2opt.sed
-
+DEFS=-DHAVE_CONFIG_H
 
 ac_libobjs=
 ac_ltlibobjs=
@@ -3974,10 +3932,15 @@
       --recheck    update $as_me by reconfiguring in the same conditions
   --file=FILE[:TEMPLATE]
 		   instantiate the configuration file FILE
+  --header=FILE[:TEMPLATE]
+		   instantiate the configuration header FILE
 
 Configuration files:
 $config_files
 
+Configuration headers:
+$config_headers
+
 Report bugs to <bug-autoconf@gnu.org>."
 _ACEOF
 
@@ -4094,6 +4057,7 @@
   "src/xalanc/Utils/XalanMsgLib/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/xalanc/Utils/XalanMsgLib/Makefile" ;;
   "samples/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/Makefile" ;;
   "Tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tests/Makefile" ;;
+  "src/xalanc/Include/xalan-config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/xalanc/Include/xalan-config.h" ;;
   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
    { (exit 1); exit 1; }; };;
@@ -4106,6 +4070,7 @@
 # bizarre bug on SunOS 4.1.3.
 if $ac_need_defaults; then
   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
 fi
 
 # Have a temporary directory for convenience.  Make it in the build tree
@@ -4385,11 +4350,6 @@
   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
   esac
 
-  if test x"$ac_file" != x-; then
-    { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-    rm -f "$ac_file"
-  fi
   # Let's still pretend it is `configure' which instantiates (i.e., don't
   # use $as_me), people would be surprised to read:
   #    /* config.h.  Generated by config.status.  */
@@ -4428,6 +4388,12 @@
 	 fi;;
       esac
     done` || { (exit 1); exit 1; }
+
+  if test x"$ac_file" != x-; then
+    { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    rm -f "$ac_file"
+  fi
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
   sed "$ac_vpsub
@@ -4457,6 +4423,229 @@
 
 done
 _ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s,^\([	 ]*\)#\([	 ]*define[	 ][	 ]*\)'
+ac_dB='[	 ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([	 ]*\)#\([	 ]*\)undef\([	 ][	 ]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+	cat >$tmp/stdin
+	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+	 # Absolute (can't be DOS-style, as IFS=:)
+	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 # Do quote $f, to prevent DOS paths from being IFS'd.
+	 echo "$f";;
+      *) # Relative
+	 if test -f "$f"; then
+	   # Build tree
+	   echo "$f"
+	 elif test -f "$srcdir/$f"; then
+	   # Source tree
+	   echo "$srcdir/$f"
+	 else
+	   # /dev/null tree
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+  # Remove the trailing spaces.
+  sed 's/[	 ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h.  The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status.  Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*\)\(([^)]*)\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless.  Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
+
+# This sed command replaces #undef with comments.  This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >>conftest.undefs <<\_ACEOF
+s,^[	 ]*#[	 ]*undef[	 ][	 ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo '  if grep "^[	 ]*#[	 ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo '  :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+  # Write a limited-size here document to $tmp/defines.sed.
+  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#define' lines.
+  echo '/^[	 ]*#[	 ]*define/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/defines.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+  rm -f conftest.defines
+  mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo '  fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.undefs >/dev/null
+do
+  # Write a limited-size here document to $tmp/undefs.sed.
+  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#undef'
+  echo '/^[	 ]*#[	 ]*undef/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+  rm -f conftest.undefs
+  mv conftest.tail conftest.undefs
+done
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    echo "/* Generated by configure.  */" >$tmp/config.h
+  else
+    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
+  fi
+  cat $tmp/in >>$tmp/config.h
+  rm -f $tmp/in
+  if test x"$ac_file" != x-; then
+    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+      { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+      rm -f $ac_file
+      mv $tmp/config.h $ac_file
+    fi
+  else
+    cat $tmp/config.h
+    rm -f $tmp/config.h
+  fi
+done
+_ACEOF
 
 cat >>$CONFIG_STATUS <<\_ACEOF
 
--- xalan-1.10.orig/c/Makefile.incl.in
+++ xalan-1.10/c/Makefile.incl.in
@@ -127,7 +127,7 @@
   
   LIB = $(CYG_PREFIX)$(PROJECT_NAME)$(LIB_MAJOR_VER)$(SHLIBSUFFIX)
 
-  PLATFORM_COMPILE_OPTIONS = -Wall -D${PLATFORM} -D_REENTRANT
+  PLATFORM_COMPILE_OPTIONS = -Wall -D${PLATFORM} -D_REENTRANT @DEFS@
               
   CC1 = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
   CC4 = $(CC1)
@@ -159,7 +159,7 @@
 	
   ifeq (${CXX}, xlC_r)
 
-			PLATFORM_COMPILE_OPTIONS = -qpic -D_AIX -D_THREAD_SAFE
+			PLATFORM_COMPILE_OPTIONS = -qpic -D_AIX -D_THREAD_SAFE @DEFS@
 			ALLLIBS = ${LIBS} -L/usr/lib 
 			
 			CC2 = $(CXX) $(PLATFORM_COMPILE_OPTIONS)
@@ -215,7 +215,7 @@
 		
 		  endif
 		
-		  PLATFORM_COMPILE_OPTIONS += ${PIC_OPTION} -D${PLATFORM} -D_REENTRANT
+		  PLATFORM_COMPILE_OPTIONS += ${PIC_OPTION} -D${PLATFORM} -D_REENTRANT @DEFS@
 		
 		  # We need the ICU library if we are using the ICUBridge
 		  ifdef XALAN_USE_ICU
@@ -244,7 +244,7 @@
   SHLIBSUFFIX=.so
   PIC_OPTION = -fPIC
 
-  PLATFORM_COMPILE_OPTIONS = -D${PLATFORM} ${PIC_OPTION} ${WCSTOMBS}
+  PLATFORM_COMPILE_OPTIONS = -D${PLATFORM} ${PIC_OPTION} ${WCSTOMBS} @DEFS@
 
   # We need the ICU library if we are using the ICUBridge
   ifdef XALAN_USE_ICU
@@ -272,7 +272,7 @@
   SHLIBSUFFIX=.so
   PIC_OPTION = -fPIC
 
-  PLATFORM_COMPILE_OPTIONS = -D${PLATFORM} ${PIC_OPTION} ${WCSTOMBS}
+  PLATFORM_COMPILE_OPTIONS = -D${PLATFORM} ${PIC_OPTION} ${WCSTOMBS} @DEFS@
 
   # We need the ICU library if we are using the ICUBridge
   ifdef XALAN_USE_ICU
@@ -296,7 +296,7 @@
 ifeq ($(PLATFORM), HPUX)
 
   SUPPORTED = TRUE
-  PLATFORM_COMPILE_OPTIONS = +Z -D${PLATFORM} -D_THREAD_SAFE
+  PLATFORM_COMPILE_OPTIONS = +Z -D${PLATFORM} -D_THREAD_SAFE @DEFS@
   # +p option removed, +W849 option added
   # to avoid error created by instantiated template symbol length limitation.
   # Also disable warning 930 about placement delete not implemented.
@@ -323,7 +323,7 @@
 
   ifeq (${CXX}, g++)
 
-	PLATFORM_COMPILE_OPTIONS = -Wall -fPIC -D${PLATFORM} -D_REENTRANT
+	PLATFORM_COMPILE_OPTIONS = -Wall -fPIC -D${PLATFORM} -D_REENTRANT @DEFS@
 
 	ifdef XALAN_USE_ICU
 	LD_RPATH_PRE=  -Wl,-rpath,
@@ -371,7 +371,7 @@
 
   ifeq (${CXX}, g++)
 
-	PLATFORM_COMPILE_OPTIONS = -Wall -fPIC -D${PLATFORM} -D_REENTRANT
+	PLATFORM_COMPILE_OPTIONS = -Wall -fPIC -D${PLATFORM} -D_REENTRANT @DEFS@
 	ALLLIBS = ${LIBS} -L/usr/lib -L/usr/local/lib -lc
 
 	EXTRA_LINK_OPTIONS=-lc
@@ -431,7 +431,7 @@
 ifeq ($(PLATFORM), OS390)
 
   SUPPORTED = TRUE
-  PLATFORM_COMPILE_OPTIONS =-Wc,dll,"langlvl(extended),float(ieee)" -D${PLATFORM} -D_XOPEN_SOURCE_EXTENDED -DXALAN_XSLT_BUILD_DLL -DXALAN_PLATFORMSUPPORT_BUILD_DLL -DXALAN_DOM_BUILD_DLL -DXALAN_XALANEXTEXTENSIONS_BUILD_DLL -DXALAN_XALANSOURCETREE_BUILD_DLL -DXALAN_TRANSFORMER_BUILD_DLL -DXALAN_XERCESPARSERLIAISON_BUILD_DLL -DXALAN_XMLSUPPORT_BUILD_DLL -DXALAN_XPATH_BUILD_DLL -DXALAN_XPATHCAPI_BUILD_DLL -DXALAN_ALLINONE_BUILD_DLL -DXALAN_EXSLT_BUILD_DLL -DXALAN_ICUBRIDGE_BUILD_DLL -DXALAN_DOMSUPPORT_BUILD_DLL
+  PLATFORM_COMPILE_OPTIONS =-Wc,dll,"langlvl(extended),float(ieee)" -D${PLATFORM} -D_XOPEN_SOURCE_EXTENDED -DXALAN_XSLT_BUILD_DLL -DXALAN_PLATFORMSUPPORT_BUILD_DLL -DXALAN_DOM_BUILD_DLL -DXALAN_XALANEXTEXTENSIONS_BUILD_DLL -DXALAN_XALANSOURCETREE_BUILD_DLL -DXALAN_TRANSFORMER_BUILD_DLL -DXALAN_XERCESPARSERLIAISON_BUILD_DLL -DXALAN_XMLSUPPORT_BUILD_DLL -DXALAN_XPATH_BUILD_DLL -DXALAN_XPATHCAPI_BUILD_DLL -DXALAN_ALLINONE_BUILD_DLL -DXALAN_EXSLT_BUILD_DLL -DXALAN_ICUBRIDGE_BUILD_DLL -DXALAN_DOMSUPPORT_BUILD_DLL @DEFS@
   ALLLIBS =
 ifeq (${OS390_XPLINK},1)
   SHLIBSUFFIX=.xplink.dll
@@ -507,7 +507,7 @@
 ifeq ($(PLATFORM), TRU64)
 
   SUPPORTED = TRUE
-  PLATFORM_COMPILE_OPTIONS = -D${PLATFORM} -ptr ${XSL_OBJ_DIR}/.cxx_repository -ieee -pthread -std strict_ansi_errors
+  PLATFORM_COMPILE_OPTIONS = -D${PLATFORM} -ptr ${XSL_OBJ_DIR}/.cxx_repository -ieee -pthread -std strict_ansi_errors @DEFS@
   ALLLIBS = ${LIBS} -L/usr/lib -lm
   SHLIBSUFFIX = .so
   CC1 = $(CXX) ${CXXFLAGS} $(PLATFORM_COMPILE_OPTIONS) -nocxxstd
@@ -522,7 +522,7 @@
 ifeq ($(PLATFORM), MACOSX)
 
   SUPPORTED = TRUE
-  PLATFORM_COMPILE_OPTIONS = -Wall -fno-elide-constructors -D${PLATFORM} -D_REENTRANT -DXALAN_USE_XERCES_LOCAL_CODEPAGE_TRANSCODERS
+  PLATFORM_COMPILE_OPTIONS = -Wall -fno-elide-constructors -D${PLATFORM} -D_REENTRANT -DXALAN_USE_XERCES_LOCAL_CODEPAGE_TRANSCODERS @DEFS@
   ALLLIBS = ${LIBS} -L/usr/lib -L/usr/local/lib
   SHLIBSUFFIX=.dylib
   CC1 = ${CXX} $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
@@ -543,7 +543,7 @@
 ifeq ($(PLATFORM), OS400)
 
   SUPPORTED = TRUE
-  PLATFORM_COMPILE_OPTIONS = -v -D_MULTI_THREADED -D${PLATFORM} -DXALAN_USE_XERCES_LOCAL_CODEPAGE_TRANSCODERS
+  PLATFORM_COMPILE_OPTIONS = -v -D_MULTI_THREADED -D${PLATFORM} -DXALAN_USE_XERCES_LOCAL_CODEPAGE_TRANSCODERS @DEFS@
   PLATFORM_C_COMPILE_OPTIONS = -v -D_MULTI_THREADED -D${PLATFORM} -DXALAN_USE_XERCES_LOCAL_CODEPAGE_TRANSCODERS
   ALLLIBS =
   MAKE_SHARED = ld -v ${LDFLAGS}
--- xalan-1.10.orig/c/configure.in
+++ xalan-1.10/c/configure.in
@@ -1,5 +1,6 @@
 dnl Process this file with autoconf to produce a configure script
 AC_INIT(src/xalanc/PlatformSupport/PlatformSupportDefinitions.hpp)
+AC_CONFIG_HEADER(src/xalanc/Include/xalan-config.h)
 
 dnl Checks for programs
 AC_PROG_CC
@@ -44,6 +45,7 @@
 case "${host}" in
         *-*-solaris*)   platform=SOLARIS ;;
         *-*-linux*)     platform=LINUX ;;
+        *-*-k*bsd*)     platform=LINUX ;;
         *-*-freebsd*)   platform=FREEBSD ;;
         *-*-netbsd*)    platform=NETBSD ;;
         *-*-irix*)      platform=IRIX ;;
--- xalan-1.10.orig/c/src/xalanc/Include/CygwinDefinitions.hpp
+++ xalan-1.10/c/src/xalanc/Include/CygwinDefinitions.hpp
@@ -0,0 +1,59 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#if !defined(GCCDEFINITIONS_HEADER_GUARD_1357924680)
+#define GCCDEFINITIONS_HEADER_GUARD_1357924680
+
+
+
+// ---------------------------------------------------------------------------
+//  A define in the build for each project is also used to control whether
+//  the export keyword is from the project's viewpoint or the client's.
+//  These defines provide the platform specific keywords that they need
+//  to do this.
+// ---------------------------------------------------------------------------
+#define XALAN_PLATFORM_EXPORT
+#define XALAN_PLATFORM_IMPORT
+#define XALAN_PLATFORM_EXPORT_FUNCTION(T) T XALAN_PLATFORM_EXPORT
+#define XALAN_PLATFORM_IMPORT_FUNCTION(T) T XALAN_PLATFORM_IMPORT
+
+
+
+
+
+#if __GNUC__ < 3
+#define XALAN_CLASSIC_IOSTREAMS
+#define XALAN_NO_MEMBER_TEMPLATES
+#define XALAN_NO_STD_ALLOCATORS
+#define XALAN_NO_USING_DECLARATION
+#endif
+
+// As of 3.1, std::numeric_limits<double> is broken, so
+// we don't use it.
+#define XALAN_NO_STD_NUMERIC_LIMITS
+#define XALAN_SGI_BASED_STL
+#define XALAN_XALANDOMCHAR_USHORT_MISMATCH
+#define XALAN_POSIX2_AVAILABLE
+#define XALAN_INLINE_INITIALIZATION
+#define XALAN_HAS_CPP_NAMESPACE
+
+#define XALAN_UNALIGNED
+
+#define XALAN_NO_FIRST_NULL_PARAM_FOR_MBSTOWS
+#define XALAN_USE_XERCES_LOCAL_CODEPAGE_TRANSCODERS
+
+#undef WIN32
+
+#endif	// GCCDEFINITIONS_HEADER_GUARD_1357924680
--- xalan-1.10.orig/c/src/xalanc/Include/XalanArrayKeyMap.hpp
+++ xalan-1.10/c/src/xalanc/Include/XalanArrayKeyMap.hpp
@@ -0,0 +1,336 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#if !defined(XALAN_ARRAYKEYMAP_HEADER_GUARD)
+#define XALAN_ARRAYKEYMAP_HEADER_GUARD
+
+
+
+#include <deque>
+#include <map>
+#include <vector>
+
+
+
+XALAN_CPP_NAMESPACE_BEGIN
+
+
+
+template<class KeyType, class ValueType, class CompareType>
+class XalanArrayKeyMap
+{
+public:
+
+#if defined(XALAN_NO_STD_NAMESPACE)
+	typedef vector<KeyType>									VectorType;
+	typedef map<const KeyType*, ValueType, CompareType>		MapType;
+	typedef deque<VectorType>								VectorHolderType;
+#else
+	typedef std::vector<KeyType>								VectorType;
+	typedef std::map<const KeyType*, ValueType, CompareType>	MapType;
+	typedef std::deque<VectorType>								VectorHolderType;
+#endif
+
+	typedef typename MapType::key_type					key_type;
+	typedef typename MapType::value_type				value_type;
+	typedef ValueType									referent_type;
+	typedef CompareType									key_compare;
+#if !defined(XALAN_NO_STD_ALLOCATORS)
+	typedef typename MapType::allocator_type			allocator_type;
+#endif
+	typedef typename MapType::size_type					size_type;
+	typedef typename MapType::difference_type			difference_type;
+	typedef typename MapType::reference					reference;
+	typedef typename MapType::const_reference			const_reference;
+	typedef typename MapType::iterator					iterator;
+	typedef typename MapType::const_iterator			const_iterator;
+	typedef typename MapType::reverse_iterator			reverse_iterator;
+	typedef typename MapType::const_reverse_iterator	const_reverse_iterator;
+
+#if defined(XALAN_NO_STD_NAMESPACE)
+	typedef pair<iterator, bool>					insert_pair_type;
+	typedef pair<iterator, iterator>				range_pair_type;
+	typedef pair<const_iterator, const_iterator>	const_range_pair_type;
+#else
+	typedef std::pair<iterator, bool>					insert_pair_type;
+	typedef std::pair<iterator, iterator>				range_pair_type;
+	typedef std::pair<const_iterator, const_iterator>	const_range_pair_type;
+#endif
+
+	explicit
+	XalanArrayKeyMap() :
+		m_map(),
+		m_keyData()
+	{
+	}
+
+	XalanArrayKeyMap(const XalanArrayKeyMap<KeyType, ValueType, CompareType>&	theOther)
+	{
+		*this = theOther;
+	}
+
+	~XalanArrayKeyMap()
+	{
+	}
+
+	XalanArrayKeyMap<KeyType, ValueType, CompareType>&
+	operator=(const XalanArrayKeyMap<KeyType, ValueType, CompareType>&	theRHS)
+	{
+		if (&theRHS != this)
+		{
+			XalanArrayKeyMap<KeyType, ValueType, CompareType>	theTemp;
+
+			const const_iterator	theEnd =
+				theRHS.end();
+
+			const_iterator	i = theRHS.begin();
+
+			while(i != theEnd)
+			{
+				theTemp.insert(*i);
+
+				++i;
+			}
+
+			swap(theTemp);
+		}
+
+		return *this;
+	}
+
+	bool
+	operator==(const XalanArrayKeyMap<KeyType, ValueType, CompareType>&		theRHS) const
+	{
+		return m_map == theRHS.m_map;
+	}
+
+	size_type
+	size() const
+	{
+		return m_map.size();
+	}
+
+	size_type
+	max_size() const
+	{
+		return m_map.max_size();
+	}
+
+	bool
+	empty() const
+	{
+		return m_map.empty();
+	}
+
+	iterator
+	begin()
+	{
+		return m_map.begin();
+	}
+
+	const_iterator
+	begin() const
+	{
+		return m_map.begin();
+	}
+
+	iterator
+	end()
+	{
+		return m_map.end();
+	}
+
+	const_iterator
+	end() const
+	{
+		return m_map.end();
+	}
+
+	reverse_iterator
+	rbegin()
+	{
+		return m_map.rbegin();
+	}
+
+	const_reverse_iterator
+	rbegin() const
+	{
+		return m_map.rbegin();
+	}
+
+	reverse_iterator
+	rend()
+	{
+		return m_map.rend();
+	}
+
+	const_reverse_iterator
+	rend() const
+	{
+		return m_map.rend();
+	}
+
+	insert_pair_type
+	insert(const value_type&	thePair)
+	{
+		m_keyData.push_back(VectorHolderType::value_type(thePair.first, thePair.first + (length(thePair.first) + 1)));
+
+		return m_map.insert(value_type(&*m_keyData.back().begin(), thePair.second));
+	}
+
+	referent_type&
+	operator[](const key_type&	theKey)
+	{
+		const iterator	i = find(theKey);
+
+		if (i == end())
+		{
+			return (*(insert(value_type(theKey, referent_type()))).first).second;
+		}
+		else
+		{
+			return (*i).second;
+		}
+	}
+
+	iterator
+	find(const key_type&	theKey)
+	{
+		return m_map.find(theKey);
+	}
+
+	const_iterator
+	find(const key_type&	theKey) const
+	{
+		return m_map.find(theKey);
+	}
+
+	iterator
+	lower_bound(const key_type&		theKey)
+	{
+		return m_map.lower_bound(theKey);
+	}
+
+	const_iterator
+	lower_bound(const key_type&		theKey) const
+	{
+		return m_map.lower_bound(theKey);
+	}
+
+	iterator
+	upper_bound(const key_type&		theKey)
+	{
+		return m_map.upper_bound(theKey);
+	}
+
+	const_iterator
+	upper_bound(const key_type&		theKey) const
+	{
+		return m_map.upper_bound(theKey);
+	}
+
+	range_pair_type
+	equal_range(const key_type&		theKey)
+	{
+		return m_map.equal_range(theKey);
+	}
+
+	const_range_pair_type
+	equal_range(const key_type&		theKey) const
+	{
+		return m_map.equal_range(theKey);
+	}
+
+#if defined(XALAN_STLPORT_STL) && !defined(__STL_MEMBER_TEMPLATES)
+	void
+	erase(iterator	theIterator)
+	{
+		// $$$ ToDo: Does not empty vector in the
+		// deque!!!
+		m_map.erase(theIterator);
+	}
+
+	void
+	erase(
+			iterator	theFirst,
+			iterator	theLast)
+	{
+		// $$$ ToDo: Does not empty vector in the
+		// deque!!!
+		m_map.erase(theFirst, theLast);
+	}
+#else
+	iterator
+	erase(iterator	theIterator)
+	{
+		// $$$ ToDo: Does not empty vector in the
+		// deque!!!
+		return m_map.erase(theIterator);
+	}
+
+	iterator
+	erase(
+			iterator	theFirst,
+			iterator	theLast)
+	{
+		// $$$ ToDo: Does not empty vector in the
+		// deque!!!
+		return m_map.erase(theFirst, theLast);
+	}
+#endif
+
+	size_type
+	erase(const key_type&	theKey)
+	{
+		// $$$ ToDo: Does not empty vector in the
+		// deque!!!
+		return m_map.erase(theKey);
+	}
+
+	void
+	swap(XalanArrayKeyMap<KeyType, ValueType, CompareType>&		theOther)
+	{
+		m_map.swap(theOther.m_map);
+
+		m_keyData.swap(theOther.m_keyData);
+	}
+
+private:
+
+	size_type
+	length(const key_type&	theKey)
+	{
+		key_type	theCurrent = theKey;
+
+		while(*theCurrent != 0)
+		{
+			++theCurrent;
+		}
+
+		return theCurrent - theKey;
+	}
+
+	MapType				m_map;
+
+	VectorHolderType	m_keyData;
+};
+
+
+
+XALAN_CPP_NAMESPACE_END
+
+
+
+#endif
--- xalan-1.10.orig/c/src/xalanc/Include/xalan-config.h.in
+++ xalan-1.10/c/src/xalanc/Include/xalan-config.h.in
@@ -0,0 +1,5 @@
+/* Include/xalan-config.h.in.  Generated automatically from configure.in by autoheader.  */
+
+/* Define if your processor stores words with the most significant
+   byte first (like Motorola and SPARC, unlike Intel and VAX).  */
+#undef WORDS_BIGENDIAN
--- xalan-1.10.orig/c/src/xalanc/Include/GCCDefinitions.hpp
+++ xalan-1.10/c/src/xalanc/Include/GCCDefinitions.hpp
@@ -16,7 +16,7 @@
 #if !defined(GCCDEFINITIONS_HEADER_GUARD_1357924680)
 #define GCCDEFINITIONS_HEADER_GUARD_1357924680
 
-
+#include <xalanc/Include/xalan-config.h>
 
 // ---------------------------------------------------------------------------
 //  A define in the build for each project is also used to control whether
--- xalan-1.10.orig/c/src/xalanc/XMLSupport/FormatterToHTML.cpp
+++ xalan-1.10/c/src/xalanc/XMLSupport/FormatterToHTML.cpp
@@ -26,7 +26,7 @@
 
 
 #include <cassert>
-
+#include <cstring>
 
 
 #include <xercesc/sax/AttributeList.hpp>
--- xalan-1.10.orig/c/src/xalanc/XSLT/TraceListenerDefault.cpp
+++ xalan-1.10/c/src/xalanc/XSLT/TraceListenerDefault.cpp
@@ -155,7 +155,7 @@
                 if (isEmpty(theNamespace) == false)
                 {
                     m_printWriter.print(theNamespace);
-                    m_printWriter.print(XalanUnicode::charColon);
+                    m_printWriter.write(XalanUnicode::charColon);
                 }
 
                 m_printWriter.print(theName.getLocalPart());
--- xalan-1.10.orig/c/src/xalanc/XSLT/ElemNumber.cpp
+++ xalan-1.10/c/src/xalanc/XSLT/ElemNumber.cpp
@@ -15,7 +15,7 @@
  */
 #include "ElemNumber.hpp"
 
-
+#include <cstring>
 
 #include <xercesc/sax/AttributeList.hpp>
 
--- xalan-1.10.orig/c/src/xalanc/XSLT/XalanTemplate.cpp
+++ xalan-1.10/c/src/xalanc/XSLT/XalanTemplate.cpp
@@ -0,0 +1,798 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+// Base include file.  Must be first.
+#include <xalanc/PlatformSupport/PlatformSupportDefinitions.hpp>
+
+
+
+#if !defined(XALAN_NEEDS_EXPLICIT_TEMPLATE_INSTANTIATION)
+
+	// No-op function to allow file to compile and link.	
+	static void foo(){}
+
+#else
+
+#include <stl/_range_errors.h>
+
+#include <algorithm>
+#include <stl/_algo.c>
+#include <stl/_algobase.c>
+#include <stl/_heap.c>
+
+#include <list>
+#include <stl/_list.c>
+
+#include <vector>
+#include <stl/_vector.c>
+
+#include <map>
+#include <stl/_tree.c>
+
+#include <deque>
+#include <stl/_deque.c>
+
+
+
+#include <xalanc/XalanDOM/XalanNode.hpp>
+
+
+
+#include <xalanc/PlatformSupport/AttributeListImpl.hpp>
+#include <xalanc/PlatformSupport/AttributeVectorEntry.hpp>
+#include <xalanc/PlatformSupport/AttributesImpl.hpp>
+#include <xalanc/PlatformSupport/AttributeVectorEntryExtended.hpp>
+#include <xalanc/PlatformSupport/DOMStringHelper.hpp>
+#include <xalanc/PlatformSupport/XalanDOMStringHashTable.hpp>
+#include <xalanc/PlatformSupport/PrintWriter.hpp>
+#include <xalanc/PlatformSupport/XalanOutputStream.hpp>
+#include <xalanc/PlatformSupport/XalanUnicode.hpp>
+#include <xalanc/PlatformSupport/XalanDOMStringCache.hpp>
+
+
+
+#include <xalanc/DOMSupport/XalanDocumentPrefixResolver.hpp>
+
+
+
+#include <xalanc/XPath/NodeRefList.hpp>
+#include <xalanc/XPath/XObjectFactoryDefault.hpp>
+#include <xalanc/XPath/XPath.hpp>
+#include <xalanc/XPath/XPathEnvSupportDefault.hpp>
+#include <xalanc/XPath/XPathExecutionContextDefault.hpp>
+#include <xalanc/XPath/XPathExpression.hpp>
+#include <xalanc/XPath/XPathFactoryBlock.hpp>
+#include <xalanc/XPath/XPathFactoryDefault.hpp>
+
+
+
+#include <xalanc/XercesParserLiaison/XercesDocumentBridge.hpp>
+#include <xalanc/XercesParserLiaison/XercesDocumentWrapper.hpp>
+#include <xalanc/XercesParserLiaison/XercesNamedNodeListCache.hpp>
+#include <xalanc/XercesParserLiaison/XercesParserLiaison.hpp>
+#include <xalanc/XercesParserLiaison/XercesToXalanNodeMap.hpp>
+
+
+
+#include <xalanc/XalanSourceTree/XalanSourceTreeDocument.hpp>
+#include <xalanc/XalanSourceTree/XalanSourceTreeElement.hpp>
+#include <xalanc/XalanSourceTree/XalanSourceTreeParserLiaison.hpp>
+#include <xalanc/XalanSourceTree/XalanSourceTreeContentHandler.hpp>
+
+
+
+#include <xalanc/XSLT/AVT.hpp>
+#include <xalanc/XSLT/AVTPart.hpp>
+#include <xalanc/XSLT/ElemAttributeSet.hpp>
+#include <xalanc/XSLT/ElemDecimalFormat.hpp>
+#include <xalanc/XSLT/ElemForEach.hpp>
+#include <xalanc/XSLT/ElemLiteralResult.hpp>
+#include <xalanc/XSLT/ElemSort.hpp>
+#include <xalanc/XSLT/ElemTextLiteral.hpp>
+#include <xalanc/XSLT/ElemUse.hpp>
+#include <xalanc/XSLT/ElemVariable.hpp>
+#include <xalanc/XSLT/ExtensionFunctionHandler.hpp>
+#include <xalanc/XSLT/ExtensionNSHandler.hpp>
+#include <xalanc/XSLT/KeyTable.hpp>
+#include <xalanc/XSLT/NamespacesHandler.hpp>
+#include <xalanc/XSLT/NodeSorter.hpp>
+#include <xalanc/XSLT/StylesheetConstructionContextDefault.hpp>
+#include <xalanc/XSLT/StylesheetExecutionContextDefault.hpp>
+#include <xalanc/XSLT/StylesheetRoot.hpp>
+#include <xalanc/XSLT/StylesheetHandler.hpp>
+#include <xalanc/XSLT/TraceListener.hpp>
+#include <xalanc/XSLT/VariablesStack.hpp>
+#include <xalanc/XSLT/XalanNumberingResourceBundle.hpp>
+#include <xalanc/XSLT/XSLTEngineImpl.hpp>
+#include <xalanc/XSLT/XSLTProcessorEnvSupportDefault.hpp>
+
+
+
+#include <xalanc/XalanTransformer/XalanTransformer.hpp>
+#include <xalanc/XalanTransformer/XalanCompiledStylesheet.hpp>
+#include <xalanc/XalanTransformer/XalanParsedSource.hpp>
+
+
+
+#if defined(XALAN_USE_ICU)
+#include <xalanc/ICUBridge/ICUBridgeCollationCompareFunctorImpl.hpp>
+#endif
+
+
+
+static void
+foo(XPathExecutionContext&	theExecutionContext)
+{
+	XALAN_USING_STD(for_each)
+	XALAN_USING_STD(replace)
+
+	{
+		vector<XalanDOMString> theDOMStringVector;
+		vector<char> theCharVector;
+		vector<wchar_t> theWCharVector;
+		vector<unsigned char> theUnsignedCharVector;
+		AttributeListImpl::AttributeVectorType theAttributeVectorEntryVector;
+		AttributesImpl::AttributesVectorType theAttributesVectorEntryVector;
+		allocator<DOMString> theAllocator;
+		XPathExpression::TokenQueueType theTokenQueueType;
+		set<const XalanNode*,less<const XalanNode*> > theXalanNodeSet;
+		XPathExecutionContext::XObjectArgVectorType theVector;
+		Stylesheet::PatternTableVectorType thePatternTableVector;
+		map<int,int,less<int> > theIntMap;
+		vector<NamespacesHandler::NamespacesMapType::iterator> theNamespacesMapTypeIteratorVector;
+		VariablesStack::ParamsVectorType	theParamsVector;
+		set<XalanNode*, less<XalanNode*> >	theInstanceSetType;
+		XalanTransformer::CompiledStylesheetPtrVectorType	theCompiledStylesheetVector;
+		XalanTransformer::ParsedSourcePtrVectorType			theParsedSourceVector;
+		XalanTransformer::ParamPairVectorType				theParamsPairVector;
+		XalanTransformer::TraceListenerVectorType			theTraceListenerVector;
+		XalanDOMStringHashTable::BucketCountsType			theBucketCountsVector;
+		vector<pair<const char*, const char*> >				theStringPairVector;
+	}
+
+	{
+		XObjectFactoryDefault::XObjectCollectionType 	theVector;
+		XObjectFactoryDefault			theFactory;
+		
+		for_each(theVector.begin(),
+			 theVector.end(),
+			 XObjectFactoryDefault::DeleteXObjectFunctor(theFactory, true));
+	}
+	
+	{
+		XPathFactoryDefault::CollectionType 	theVector;	
+		XPathFactoryDefault						theXPath;		
+
+		for_each(theVector.begin(),
+			 theVector.end(),
+			 XPathFactoryDefault::DeleteXPathFunctor(theXPath, true));
+	}
+
+	{
+		XalanDOMStringCache::StringListType theVector;	
+				
+		for_each(theVector.begin(),
+			 theVector.end(),
+			 DeleteFunctor<XalanDOMString>());
+	}
+
+	{
+		AttributeListImpl::AttributeVectorType	theVector;
+		
+		for_each(theVector.begin(),
+				 theVector.end(),
+				 DeleteFunctor<AttributeVectorEntry>());
+	}	
+
+	{
+		AttributesImpl::AttributesVectorType	theVector;
+		
+		for_each(theVector.begin(),
+				 theVector.end(),
+				 DeleteFunctor<AttributeVectorEntryExtended>());
+	}	
+
+	{
+		typedef XPathEnvSupportDefault::NamespaceFunctionTableDeleteFunctor		NamespaceFunctionTableDeleteFunctor;
+	
+		typedef NamespaceFunctionTableDeleteFunctor::FunctionTableInnerType 			FunctionTableType;
+		typedef NamespaceFunctionTableDeleteFunctor::NamespaceFunctionTablesInnerType 	NamespaceFunctionTablesType;
+	
+		NamespaceFunctionTablesType	theTable;
+		
+		const NamespaceFunctionTablesType::value_type		theValue;
+		
+		for_each(theTable.begin(),
+			 theTable.end(),
+			 NamespaceFunctionTableDeleteFunctor());
+	}
+	
+	{
+		XercesDocumentBridge::NodeVectorType	theVector;
+		
+		for_each(theVector.begin(),
+			 theVector.end(),
+			 DeleteFunctor<XalanNode>());
+	}
+
+	{
+		XercesNamedNodeListCache::NodeListCacheType		theCache;
+		
+		for_each(theCache.begin(),
+			 theCache.end(),
+			 MapValueDeleteFunctor<XercesNamedNodeListCache::NodeListCacheType>());
+	}
+
+	{
+		Stylesheet::AttributeSetVectorType	theVector;
+		
+		for_each(
+			theVector.begin(),
+			theVector.end(),
+			DeleteFunctor<ElemAttributeSet>());
+	}
+
+	{
+		StylesheetExecutionContextDefault::KeyTablesTableType	theTable;
+
+		for_each(theTable.begin(),
+			 theTable.end(),
+			 MapValueDeleteFunctor<StylesheetExecutionContextDefault::KeyTablesTableType>());
+	}
+
+	{
+		Stylesheet::ExtensionNamespacesMapType	theMap;
+
+		for_each(theMap.begin(),
+			 theMap.end(),
+			 makeMapValueDeleteFunctor(theMap));
+	}
+
+	{
+		Stylesheet::StylesheetVectorType	theVector;
+		
+		for_each(theVector.begin(),
+			 theVector.end(),
+			 DeleteFunctor<Stylesheet>());
+	}
+
+	{
+		Stylesheet::ElemDecimalFormatVectorType	theVector;
+		
+		for_each(theVector.begin(),
+			 theVector.end(),
+			 DeleteFunctor<ElemDecimalFormat>());
+	}
+
+	{
+		Stylesheet::ElemVariableVectorType	theVector;
+		
+		for_each(theVector.begin(),
+			 theVector.end(),
+			 DeleteFunctor<ElemVariable>());
+	}
+
+	{
+		Stylesheet::ElemVariableVectorType	theVector;
+		
+		for_each(theVector.begin(),
+			 theVector.end(),
+			 DeleteFunctor<ElemVariable>());
+	}
+
+	{
+		const Stylesheet::PatternTableVectorType	theList;
+
+		for_each(
+			theList.begin(),
+			theList.end(),
+			DeleteFunctor<Stylesheet::MatchPattern2>());
+	}
+
+	{
+		StylesheetHandler::ElemTemplateStackType	theVector;
+		
+		for_each(theVector.begin(),
+			 theVector.end(),
+			 DeleteFunctor<ElemTemplateElement>());
+	}
+
+	{
+		const VariablesStack::ParamsVectorType	theVector;
+		VariablesStack 							theVariablesStack;
+		
+		for_each(theVector.begin(),
+			 theVector.end(),
+			 VariablesStack::PushParamFunctor(theVariablesStack));
+	}
+
+	{
+		ElemForEach::SortElemsVectorType	theVector;
+		
+		for_each(theVector.begin(),
+			 theVector.end(),
+			 DeleteFunctor<ElemSort>());
+	}
+
+	{
+		StylesheetConstructionContextDefault::StylesheetVectorType	theVector;
+		
+		StylesheetRoot*		theStylesheetRoot;
+
+		find(
+			theVector.begin(),
+			theVector.end(),
+			theStylesheetRoot);
+
+		for_each(
+			theVector.begin(),
+			theVector.end(),
+			DeleteFunctor<StylesheetRoot>());
+	}
+
+	{
+		XALAN_USING_STD(sort)
+
+		StylesheetRoot::XalanQNameVectorType	theVector;
+
+		sort(
+				theVector.begin(),
+				theVector.end(),
+				pointer_less<XalanQName>());
+	}
+
+	{
+		StylesheetExecutionContextDefault::FormatterListenerVectorType	theVector;
+		
+		for_each(
+			theVector.begin(),
+			theVector.end(),
+			DeleteFunctor<FormatterListener>());
+	}
+
+	{
+		StylesheetExecutionContextDefault::PrintWriterVectorType	theVector;
+		
+		for_each(
+			theVector.begin(),
+			theVector.end(),
+			DeleteFunctor<PrintWriter>());
+	}
+
+	{
+		StylesheetExecutionContextDefault::OutputStreamVectorType	theVector;
+
+		for_each(
+			theVector.begin(),
+			theVector.end(),
+			DeleteFunctor<XalanOutputStream>());
+	}
+
+	{
+		typedef StylesheetExecutionContextDefault::XPathCacheMapType		XPathCacheMapType;
+		typedef StylesheetExecutionContextDefault::XPathCacheReturnFunctor	XPathCacheReturnFunctor;
+
+		XPathCacheMapType	theMap;
+
+		XSLTEngineImpl*	const	xsltProcessor = 0;
+
+		for_each(theMap.begin(),
+			 theMap.end(),
+			 XPathCacheReturnFunctor(*xsltProcessor));
+	}
+
+
+	{
+		XSLTEngineImpl::TraceListenerVectorType	theVector;
+		
+		const GenerateEvent*	theEvent;
+
+		for_each(
+			theVector.begin(),
+			theVector.end(),
+			TraceListener::TraceListenerGenerateFunctor(*theEvent));
+	}
+
+	{
+		XSLTEngineImpl::TraceListenerVectorType	theVector;
+		
+		const SelectionEvent*	theEvent;
+
+		for_each(
+			theVector.begin(),
+			theVector.end(),
+			TraceListener::TraceListenerSelectFunctor(*theEvent));
+	}
+
+	{
+		XSLTEngineImpl::TraceListenerVectorType	theVector;
+		
+		const TracerEvent*	theEvent;
+
+		for_each(
+			theVector.begin(),
+			theVector.end(),
+			TraceListener::TraceListenerTraceFunctor(*theEvent));
+	}
+	
+	{
+		XalanSourceTreeParserLiaison::DocumentMapType	theMap;
+
+		for_each(theMap.begin(),
+			 theMap.end(),
+			 makeMapValueDeleteFunctor(theMap));
+	}
+
+	{
+		XSLTEngineImpl::TraceListenerVectorType		theVector;
+
+		remove(
+			theVector.begin(),
+			theVector.end(),
+		 	XSLTEngineImpl::TraceListenerVectorType::value_type(0));
+	}
+
+	{
+		XSLTEngineImpl::XalanDOMStringPointerVectorType		theVector;
+		
+		XalanDOMString	nodeName;
+
+		find_if(
+			theVector.begin(),
+			theVector.end(),
+			XSLTEngineImpl::FindStringPointerFunctor(nodeName));
+	}
+
+
+	{
+		XalanDOMString	theString;
+
+		replace(
+			theString.begin(),
+			theString.end(),
+			XalanDOMChar(XalanUnicode::charReverseSolidus),
+			XalanDOMChar(XalanUnicode::charSolidus));
+	}
+	
+	{
+		NodeRefList::NodeListVectorType theVector;
+
+		remove(	
+			theVector.begin(),
+			theVector.end(),
+			NodeRefList::NodeListVectorType::value_type(0));
+	}
+
+	{
+		XALAN_USING_STD(back_inserter)
+		XALAN_USING_STD(copy)
+
+		typedef MutableNodeRefList::addNodeInDocOrderFunctor	addNodeInDocOrderFunctor;
+
+		{
+			NodeRefList::NodeListVectorType theVector;
+
+			copy(
+				theVector.rbegin(),
+				theVector.rend(),
+				back_inserter(theVector));
+		}
+
+		{
+			MutableNodeRefList	theList;
+
+			MutableNodeRefList::addNodeInDocOrderFunctor	theFunctor(theList, theExecutionContext);
+
+			const NodeRefList::NodeListVectorType	theConstVector;
+
+			for_each(
+				theConstVector.begin(),
+				theConstVector.end(),
+				theFunctor);
+
+			for_each(
+				theConstVector.rbegin(),
+				theConstVector.rend(),
+				theFunctor);
+		}
+	}
+
+	{
+		NodeSorter::NodeVectorType			theVector;
+		NodeSorter::NodeSortKeyCompare*		theComparer;
+
+		stable_sort(	
+			theVector.begin(),
+			theVector.end(),
+			*theComparer);
+	}
+
+	{
+		XalanTransformer::CompiledStylesheetPtrVectorType	theVector;
+		
+		for_each(theVector.begin(),
+				 theVector.end(),
+				 DeleteFunctor<XalanCompiledStylesheet>());
+	}	
+
+	{
+		XalanTransformer::ParsedSourcePtrVectorType		theVector;
+
+		for_each(theVector.begin(),
+				 theVector.end(),
+				 DeleteFunctor<XalanParsedSource>());
+	}
+
+#if defined(XALAN_USE_ICU)
+	{
+		ICUBridgeCollationCompareFunctorImpl::CollatorCacheListType  theCache;
+
+		for_each(
+			theCache.begin(),
+			theCache.end(),
+			ICUBridgeCollationCompareFunctorImpl::CollationCacheStruct::CollatorDeleteFunctor());
+
+		find_if(
+			theCache.begin(),
+			theCache.end(),
+			ICUBridgeCollationCompareFunctorImpl::CollationCacheStruct::CollatorFindFunctor(0));
+	}
+#endif
+
+#if __SGI_STL_PORT >= 452
+
+	{
+		VariablesStack::RecursionGuardStackType		theStack;
+
+		const ElemVariable* const	var = 0;
+
+		find(
+			theStack.begin(),
+			theStack.end(),
+			var);
+	}
+
+	{
+		XalanTransformer::CompiledStylesheetPtrVectorType	theVector;
+
+		const XalanCompiledStylesheet*	theStylesheet = 0;
+
+		find(
+			theVector.begin(),
+			theVector.end(),
+			theStylesheet);
+	}
+
+	{
+		XalanTransformer::ParsedSourcePtrVectorType		theVector;
+
+		const XalanParsedSource*	theParsedSource = 0;
+
+		find(
+			theVector.begin(),
+			theVector.end(),
+			theParsedSource);
+	}
+
+	{
+		const XMLCh* const name = 0;
+
+		AttributeListImpl::AttributeVectorType	theVector;
+
+		find_if(
+			theVector.begin(),
+			theVector.end(),
+			AttributeListImpl::NameCompareFunctor(name));
+	}
+
+	{
+		const XMLCh* const name = 0;
+
+		const AttributeListImpl::AttributeVectorType	theVector;
+
+		find_if(
+			theVector.begin(),
+			theVector.end(),
+			AttributeListImpl::NameCompareFunctor(name));
+	}
+
+	{
+		const XMLCh* const	uri = 0;
+		const XMLCh* const	localName = 0;
+
+		const AttributesImpl::AttributesVectorType	theVector;
+
+		find_if(
+			theVector.begin(),
+			theVector.end(),
+			AttributesImpl::URIAndLocalNameCompareFunctor(uri, localName));
+	}
+
+	{
+		const XMLCh* const	uri = 0;
+		const XMLCh* const	localName = 0;
+
+		const AttributesImpl::AttributesVectorType	theVector;
+
+		find_if(
+			theVector.begin(),
+			theVector.end(),
+			AttributesImpl::URIAndLocalNameCompareFunctor(uri, localName));
+	}
+
+	{
+		const XMLCh* const name = 0;
+
+		AttributesImpl::AttributesVectorType	theVector;
+
+		find_if(
+			theVector.begin(),
+			theVector.end(),
+			AttributesImpl::NameCompareFunctor(name));
+	}
+
+	{
+		const XMLCh* const name = 0;
+
+		const AttributesImpl::AttributesVectorType	theVector;
+
+		find_if(
+			theVector.begin(),
+			theVector.end(),
+			AttributesImpl::NameCompareFunctor(name));
+	}
+
+	{
+		const XalanDOMChar*		theString = 0;
+
+		const XalanDOMStringHashTable::BucketType		theBucket;
+
+		find_if(
+			theBucket.begin(),
+			theBucket.end(),
+			XalanDOMStringHashTable::equalsXalanDOMString(theString, 0));
+	}
+
+	{
+		const XalanNode*	theXalanNode = 0;
+
+		const XercesToXalanNodeMap::XercesNodeMapType	theMap;
+
+		find_if(
+			theMap.begin(),
+			theMap.end(),
+			XercesToXalanNodeMap::NameMapEqualsFunctor(theXalanNode));
+	}
+
+	{
+		const XalanNode*	theXalanNode = 0;
+
+		NodeRefList::NodeListVectorType		theVector;
+
+		find(
+			theVector.begin(),
+			theVector.end(),
+			theXalanNode);
+	}
+
+	{
+		const XalanNode*	theXalanNode = 0;
+
+		const NodeRefList::NodeListVectorType	theVector;
+
+		find(
+			theVector.begin(),
+			theVector.end(),
+			theXalanNode);
+	}
+
+	{
+		const Stylesheet::MatchPattern2*	thePattern = 0;
+
+		Stylesheet::PatternTableVectorType	theVector;
+
+		find(
+			theVector.begin(),
+			theVector.end(),
+			thePattern);
+	}
+
+	{
+		XalanNode*	theXalanNode = 0;
+
+		XercesDocumentBridge::NodeVectorType	theVector;
+
+		find(
+			theVector.begin(),
+			theVector.end(),
+			theXalanNode);
+	}
+
+	{
+		XalanDOMString*		theString = 0;
+
+		XalanDOMStringCache::StringListType		theList;
+
+		find(
+			theList.begin(),
+			theList.end(),
+			theString);
+	}
+
+	{
+		const XalanQName*	theQName;
+
+		const StylesheetRoot::XalanQNameVectorType	theVector;
+
+		find_if(
+			theVector.begin(),
+			theVector.end(),
+			pointer_equals_predicate<XalanQName>(theQName));
+	}
+
+	{
+		const StylesheetHandler::BoolStackType	theStack;
+
+		find(
+			theStack.rbegin(),
+			theStack.rend(),
+			true);
+	}
+
+	{
+		const ElemTemplateElement*	theElement = 0;
+
+		const StylesheetExecutionContextDefault::ElementRecursionStackType	theStack;
+
+		find(
+			theStack.begin(),
+			theStack.end(),
+			theElement);
+	}
+
+	{
+		XObjectFactoryDefault::XObjectCollectionType	theCollection;	
+		XObject*										theXObject;		
+
+		find(
+			theCollection.begin(),
+			theCollection.end(),
+			theXObject);
+	}
+
+	{
+		XPath::TargetDataVectorType		theVector;
+	}
+#endif
+}
+
+
+
+#include <stl/_alloc.h>
+#include <stl/_alloc.c>
+
+
+void
+foo2()
+{
+	__node_alloc<0,0> alloc1;
+	__node_alloc<1,0> alloc2;
+}
+
+
+
+#endif
--- xalan-1.10.orig/c/src/xalanc/XalanDOM/XalanDOMString.cpp
+++ xalan-1.10/c/src/xalanc/XalanDOM/XalanDOMString.cpp
@@ -19,7 +19,7 @@
 
 
 #include <cassert>
-
+#include <cstring>
 
 
 #include <xalanc/Include/XalanMemMngArrayAllocate.hpp>
--- xalan-1.10.orig/c/src/xalanc/XalanExe/XalanExe.cpp
+++ xalan-1.10/c/src/xalanc/XalanExe/XalanExe.cpp
@@ -19,6 +19,7 @@
 
 
 #include <cstdlib>
+#include <cstring>
 #if defined(XALAN_CLASSIC_IOSTREAMS)
 #include <iostream.h>
 #else
--- xalan-1.10.orig/c/src/xalanc/PlatformSupport/DirectoryEnumerator.hpp
+++ xalan-1.10/c/src/xalanc/PlatformSupport/DirectoryEnumerator.hpp
@@ -36,7 +36,7 @@
 
 #include <functional>
 #include <iterator>
-
+#include <cstring>
 
 #include "xercesc/framework/MemoryManager.hpp"
 
--- xalan-1.10.orig/c/src/xalanc/XalanEXSLT/XalanEXSLTMath.cpp
+++ xalan-1.10/c/src/xalanc/XalanEXSLT/XalanEXSLTMath.cpp
@@ -1460,7 +1460,7 @@
 static const XalanEXSLTFunctionAcos         s_acosFunction;
 static const XalanEXSLTFunctionAsin         s_asinFunction;
 static const XalanEXSLTFunctionAtan         s_atanFunction;
-static const XalanEXSLTFunctionAtan         s_atan2Function;
+static const XalanEXSLTFunctionAtan2        s_atan2Function;
 static const XalanEXSLTFunctionConstant     s_constantFunction;
 static const XalanEXSLTFunctionCos          s_cosFunction;
 static const XalanEXSLTFunctionExp          s_expFunction;
--- xalan-1.10.orig/c/samples/Makefile.in
+++ xalan-1.10/c/samples/Makefile.in
@@ -85,11 +85,8 @@
 
 ApacheModuleXSLT: prepare $(XSL_LIB_DIR)/mod_xslt$(SHLIBSUFFIX) 
 
-$(XSL_LIB_DIR)/mod_xslt$(SHLIBSUFFIX) : $(XSL_OBJ_DIR)/mod_xslt.o
-	$(MAKE_SHARED) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS)  \
-	$(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	 $(OTHER_LINK_PARAMETERS)
-$(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/ApacheModuleXSLT/%.c
-	$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) -I/usr/include/apache/ $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+$(XSL_LIB_DIR)/mod_xslt$(SHLIBSUFFIX) : $(SAMPLES_DIR)/ApacheModuleXSLT/mod_xslt.c
+	apxs -c $(XSL_INCL) -o $@ $(XSL_BUILD_OPTIONS) -L$(XSL_LIB_DIR) $(XALAN_LIB) $(SAMPLES_DIR)/ApacheModuleXSLT/mod_xslt.c
 
 CompileStylesheet: prepare $(XSL_BIN_DIR)/CompileStylesheet
 
--- xalan-1.10.orig/c/samples/configure
+++ xalan-1.10/c/samples/configure
@@ -1171,6 +1171,7 @@
 case "${host}" in
         *-*-solaris*)   platform=SOLARIS ;;
         *-*-linux*)     platform=LINUX ;;
+        *-*-k*bsd*)     platform=LINUX ;;
         *-*-freebsd*)   platform=FREEBSD ;;
         *-*-netbsd*)    platform=NETBSD ;;
         *-*-irix*)      platform=IRIX ;;
--- xalan-1.10.orig/c/samples/configure.in
+++ xalan-1.10/c/samples/configure.in
@@ -46,6 +46,7 @@
 case "${host}" in
         *-*-solaris*)   platform=SOLARIS ;;
         *-*-linux*)     platform=LINUX ;;
+        *-*-k*bsd*)     platform=LINUX ;;
         *-*-freebsd*)   platform=FREEBSD ;;
         *-*-netbsd*)    platform=NETBSD ;;
         *-*-irix*)      platform=IRIX ;;
--- xalan-1.10.orig/c/xdocs/DoxyfileXalan
+++ xalan-1.10/c/xdocs/DoxyfileXalan
@@ -506,7 +506,7 @@
 # toolkit from AT&T and Lucent Bell Labs. The other options in this section
 # have no effect if this option is set to NO (the default)
 
-HAVE_DOT             = YES
+HAVE_DOT             = NO
 
 # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
 # will generate a graph for each documented class showing the direct and
--- xalan-1.10.orig/c/Tests/Harness/XMLFileReporter.cpp
+++ xalan-1.10/c/Tests/Harness/XMLFileReporter.cpp
@@ -0,0 +1,751 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "XMLFileReporter.hpp" 
+
+
+
+#include <cstdlib>
+#include <ctime>
+
+
+
+#include <xalanc/PlatformSupport/DOMStringHelper.hpp>
+#include <xalanc/PlatformSupport/XalanUnicode.hpp>
+
+
+
+XALAN_CPP_NAMESPACE_BEGIN
+
+
+
+XMLFileReporter::XMLFileReporter(const XalanDOMString&	fileName) :
+	OPT_FILENAME(),
+	ELEM_RESULTSFILE(),
+	ELEM_TESTFILE(),
+	ELEM_FILERESULT(),
+	ELEM_TESTCASE(),
+	ELEM_CASERESULT(),
+	ELEM_CHECKRESULT(),
+	ELEM_STATISTIC(),
+	ELEM_LONGVAL(),
+	ELEM_DOUBLEVAL(),
+	ELEM_MESSAGE(),
+	ELEM_ARBITRARY(),
+	ELEM_HASHTABLE(),
+	ELEM_HASHITEM(),
+	ATTR_LEVEL(),
+	ATTR_DESC(),
+	ATTR_TIME(),
+	ATTR_RESULT(),
+	ATTR_KEY(),
+	ATTR_FILENAME(),
+	LESS_THAN(),
+	GREATER_THAN(),
+	EQUALS_QUOTE(),
+	SPACE(),
+	QUOTE(),
+	QUOTE_SPACE(),
+	QUOTE_GREATER_THAN(),
+	QUOTE_SOLIDUS_GREATER_THAN(),
+	PASS(),
+	AMBG(),
+	ERRR(),
+	FAIL(),
+	LESS_THAN_SOLIDUS(),
+	XML_HEADER(),
+	REASON_EQUALS_QUOTE(),
+	TESTCASEINIT_HDR(),
+	TESTCASECLOSE_HDR(),
+	MESSAGE_HDR(),
+	STATISTIC_HDR(),
+	ARBITRARY_HDR(),
+	HASHTABLE_HDR(),
+	HASHITEM_HDR(),
+	CHECKPASS_HDR(),
+	CHECKAMBG_HDR(),
+	CHECKERRR_HDR(),
+	CHECKFAIL_HDR(),
+	CHECKFAIL_FTR(),
+	m_anyOutput(false),
+	m_fileName(fileName),
+	m_fileHandle(0),
+	m_ready(false),
+	m_error(false),
+	m_flushOnCaseClose(true)
+{
+	if (m_fileName.empty() == false)
+	{
+		m_ready = initialize();
+	}
+}
+
+bool
+XMLFileReporter::initialize()
+{   	
+    if (m_fileName.empty() == true)
+    {
+        // We don't have a valid file, so bail
+        m_error = true;
+        m_ready = false;
+        fprintf(stderr, "XMLFileReporter.initialize() ERROR: No file name specified");
+    }
+	else
+	{
+		// Transcode down the file name...
+		const CharVectorType	theTranscodedFileName(m_fileName.transcode());
+		const char* const		theTranscodedFileNamePointer = &theTranscodedFileName.front();
+
+		// Create a file and ensure it has a place to live
+		m_fileHandle = fopen(theTranscodedFileNamePointer, "w");
+		if (m_fileHandle == 0)
+		{
+			// Couldn't create or find the directory for the file to live in, so bail
+			m_error = true;
+			m_ready = false;
+			fprintf(stderr, "XMLFileReporter.initialize() ERROR: unble to open file, %s", theTranscodedFileNamePointer);
+			return(false);
+		}
+		else
+		{
+			m_ready = true;
+
+			initStrings();
+
+			startResultsFile();
+
+			// fprintf(stderr, "DEBUG:XMLFileReporter.initialize() complete with " + fileName);
+		}
+	}
+
+    return m_ready;
+}
+
+
+
+bool
+XMLFileReporter::getFlushOnCaseClose()
+{
+    return(m_flushOnCaseClose);
+}
+
+
+
+const XalanDOMString& 
+XMLFileReporter::getFileName() const
+{
+    return(m_fileName);
+}
+
+
+
+void 
+XMLFileReporter::setFileName(const XalanDOMString& fileName)
+{
+	m_fileName = fileName;
+}
+
+
+
+bool 
+XMLFileReporter::checkError()
+{
+    // Ensure our underlying reporter, if one, is still OK
+    if (m_fileHandle == 0)            
+    {            
+        m_error = true;        
+    }
+    return(m_error);
+}
+
+
+
+bool 
+XMLFileReporter::isReady() 
+{
+    // Ensure our underlying reporter, if one, is still OK
+    if (m_fileHandle == 0) 
+    {
+        // NEEDSWORK: should we set m_ready = false in this case?
+        //            errors in the PrintStream are not necessarily fatal
+        m_error = true;
+        m_ready = false;
+    }
+    return(m_ready);
+}
+
+
+
+void 
+XMLFileReporter::flush()
+{
+    if (isReady())
+    {
+		fflush(m_fileHandle);
+    }
+}
+
+
+
+void 
+XMLFileReporter::close()
+{
+    fflush(m_fileHandle);
+    if (isReady()) 
+    {
+		if (m_fileHandle != 0)
+		{
+			closeResultsFile();
+			fclose(m_fileHandle);
+		}
+    }
+    m_ready = false;
+}
+
+
+
+void 
+XMLFileReporter::logTestFileInit(const XalanDOMString& msg)
+{
+    if (isReady())
+    {
+        printToFile(LESS_THAN + ELEM_TESTFILE 
+                              + SPACE + ATTR_DESC + EQUALS_QUOTE + escapestring(msg) + QUOTE_SPACE + ATTR_TIME + EQUALS_QUOTE + getDateTimeString() + QUOTE_GREATER_THAN);
+    }
+}
+
+
+
+void 
+XMLFileReporter::logTestFileClose(const XalanDOMString& /* msg */, const XalanDOMString& /* result */)
+{
+    if (isReady())
+    {
+//        printToFile(LESS_THAN + ELEM_FILERESULT 
+//                             + SPACE + ATTR_DESC + EQUALS_QUOTE + escapestring(msg) + QUOTE_SPACE + ATTR_RESULT + EQUALS_QUOTE + result + QUOTE_SPACE + ATTR_TIME + EQUALS_QUOTE + getDateTimeString() + QUOTE_SOLIDUS_GREATER_THAN);
+        printToFile(LESS_THAN_SOLIDUS + ELEM_TESTFILE + GREATER_THAN);
+    }
+    flush();
+}
+
+
+
+void 
+XMLFileReporter::logTestCaseInit(const XalanDOMString& msg)
+{
+    if (isReady())
+    {
+        printToFile(TESTCASEINIT_HDR + escapestring(msg) + QUOTE_GREATER_THAN);
+    }
+}
+
+
+
+void 
+XMLFileReporter::logTestCaseClose(const XalanDOMString& /* msg */, const XalanDOMString& /* result */)
+{
+    if (isReady())
+    {
+        //printToFile(TESTCASECLOSE_HDR + escapestring(msg) + QUOTE_SPACE + ATTR_RESULT + EQUALS_QUOTE + result + QUOTE_SOLIDUS_GREATER_THAN);
+        printToFile(LESS_THAN_SOLIDUS + ELEM_TESTCASE + GREATER_THAN);
+    }
+    if (getFlushOnCaseClose())
+    {
+        flush();
+    }
+}
+
+
+
+void 
+XMLFileReporter::logMessage(int level, const XalanDOMString& msg)
+{
+	char tmp[20];
+	sprintf(tmp, "%d", level);
+
+    if (isReady())
+    {
+        printToFile(MESSAGE_HDR + tmp + QUOTE_GREATER_THAN);
+        printToFile(escapestring(msg));
+        printToFile(LESS_THAN_SOLIDUS + ELEM_MESSAGE + GREATER_THAN);
+    }
+}
+
+void XMLFileReporter::addMetricToAttrs(char* desc, double theMetric, Hashtable& attrs)
+{
+	XalanDOMString	temp;
+
+	DoubleToDOMString(theMetric, temp);
+	attrs.insert(Hashtable::value_type(XalanDOMString(desc), temp));
+
+	return;
+}
+
+void 
+XMLFileReporter::logElementWAttrs(int /* level */, const XalanDOMString& element, Hashtable attrs, const XalanDOMString& msg)
+{
+	if (isReady() && !element.empty()&& !attrs.empty())
+    {
+//		char tmp[20];
+//		sprintf(tmp, "%d", level);
+//
+//		Took out this level attribute cuz we don't use it.
+//      printToFile(LESS_THAN + element + SPACE + ATTR_LEVEL + EQUALS_QUOTE
+//                      + tmp + QUOTE);
+        printToFile(LESS_THAN + element + SPACE);
+	
+		Hashtable::iterator theEnd = attrs.end();	
+    
+       	for(Hashtable::iterator i = attrs.begin(); i != theEnd; ++i)
+        {            
+			
+            printToFile((*i).first + EQUALS_QUOTE
+                                  + (*i).second + QUOTE);
+        }
+
+        printToFile(GREATER_THAN);
+        if (msg.empty() != 0)
+            printToFile(escapestring(msg));
+        printToFile(LESS_THAN_SOLIDUS + element + GREATER_THAN);
+    }
+}
+
+void 
+XMLFileReporter::logElement(const XalanDOMString& element, const XalanDOMString& msg)
+{
+	if (isReady() && !element.empty() && !msg.empty())
+    {
+		printToFile(LESS_THAN + element + GREATER_THAN + escapestring(msg) + LESS_THAN_SOLIDUS + element + GREATER_THAN);
+    }
+}
+
+void 
+XMLFileReporter::logStatistic (int level, long lVal, double dVal, const XalanDOMString& msg)
+{
+	if (isReady())
+    {
+		char tmp[40];
+
+		sprintf(tmp, "%d", level);
+        printToFile(STATISTIC_HDR + tmp + QUOTE_SPACE + ATTR_DESC + EQUALS_QUOTE + escapestring(msg) + QUOTE_GREATER_THAN);
+		
+		sprintf(tmp, "%ld", lVal);
+		printToFile(LESS_THAN + ELEM_LONGVAL + GREATER_THAN + tmp + LESS_THAN_SOLIDUS + ELEM_LONGVAL + GREATER_THAN);
+		
+		sprintf(tmp, "%f", dVal);
+        printToFile(LESS_THAN + ELEM_DOUBLEVAL + GREATER_THAN + tmp + LESS_THAN_SOLIDUS + ELEM_DOUBLEVAL + GREATER_THAN);
+        
+		printToFile(LESS_THAN_SOLIDUS + ELEM_STATISTIC + GREATER_THAN);
+		
+    }
+}
+
+
+
+void 
+XMLFileReporter::logArbitraryMessage (int level, const XalanDOMString& msg)
+{
+	char tmp[20];
+	sprintf(tmp, "%d", level);
+
+    if (isReady())
+    {            
+		printToFile(ARBITRARY_HDR + tmp + QUOTE_GREATER_THAN);
+        printToFile(escapestring(msg));
+        printToFile(LESS_THAN_SOLIDUS + ELEM_ARBITRARY + GREATER_THAN);
+    }
+}
+
+/*
+void logHashtable (int level, Hashtable hash, XalanDOMString msg)
+{
+    if (isReady())
+    {
+        printToFile(HASHTABLE_HDR + level + QUOTE_SPACE + ATTR_DESC + EQUALS_QUOTE + msg + QUOTE_GREATER_THAN);
+        if (hash == null)
+        {
+            printToFile(LESS_THAN + ELEM_HASHITEM + SPACE + ATTR_KEY + "=\"null\">");
+            printToFile(LESS_THAN_SOLIDUS + ELEM_HASHITEM + GREATER_THAN);
+        }
+        try
+        {
+            for (Enumeration enum = hash.keys(); enum.hasMoreElements();)
+            {
+                Object key = enum.nextElement();
+                // Ensure we'll have clean output by pre-fetching value before outputting anything
+                XalanDOMString value = hash.get(key).tostring();
+                printToFile(HASHITEM_HDR + key.tostring() + QUOTE_GREATER_THAN);
+                printToFile(value);
+                printToFile(LESS_THAN_SOLIDUS + ELEM_HASHITEM + GREATER_THAN);
+            }
+        } 
+        catch (Exception e)
+        {
+            // No-op: should ensure we have clean output
+        }
+        printToFile(LESS_THAN_SOLIDUS + ELEM_HASHTABLE + GREATER_THAN);
+    }
+}
+*/
+
+
+
+void 
+XMLFileReporter::logCheckPass(const XalanDOMString& comment)
+{
+    if (isReady())
+    {
+        printToFile(CHECKPASS_HDR + escapestring(comment) + QUOTE_SOLIDUS_GREATER_THAN);
+    }
+}
+
+
+void 
+XMLFileReporter::logCheckFail(const XalanDOMString& comment)
+{
+    if (isReady())
+    {
+        printToFile(CHECKFAIL_HDR + escapestring(comment) + QUOTE_SOLIDUS_GREATER_THAN);
+
+    }
+}
+
+
+void 
+XMLFileReporter::logCheckFail(const XalanDOMString& test, Hashtable actexp)
+{
+    if (isReady())
+    {
+        printToFile(CHECKFAIL_HDR + escapestring(test) + QUOTE);
+
+		printToFile(GREATER_THAN);
+		
+		Hashtable::iterator aeEnd = actexp.end();
+       	for(Hashtable::iterator ii = actexp.begin(); ii != aeEnd; ++ii)
+        {            
+			logElement((*ii).first, (*ii).second);
+        }
+
+		printToFile(CHECKFAIL_FTR);
+    }
+}
+
+void 
+XMLFileReporter::logCheckFail(const XalanDOMString& test, Hashtable attrs, Hashtable actexp)
+{
+    if (isReady())
+    {
+        printToFile(CHECKFAIL_HDR + escapestring(test) + QUOTE);
+
+		Hashtable::iterator fdEnd = attrs.end();	
+       	for(Hashtable::iterator i = attrs.begin(); i != fdEnd; ++i)
+        {            
+            printToFile((*i).first + EQUALS_QUOTE
+                                  + (*i).second + QUOTE);
+        }
+
+		printToFile(GREATER_THAN);
+		
+		Hashtable::iterator aeEnd = actexp.end();
+       	for(Hashtable::iterator ii = actexp.begin(); ii != aeEnd; ++ii)
+        {            
+			logElement((*ii).first, (*ii).second);
+        }
+
+		printToFile(CHECKFAIL_FTR);
+    }
+}
+
+void 
+XMLFileReporter::logCheckAmbiguous(const XalanDOMString& comment)
+{
+    if (isReady())
+    {
+        printToFile(CHECKAMBG_HDR + escapestring(comment) + QUOTE_SOLIDUS_GREATER_THAN);
+    }
+}
+
+
+void 
+XMLFileReporter::logErrorResult(const XalanDOMString& test, const XalanDOMString& reason)
+{
+    if (isReady())
+    {
+        printToFile(CHECKFAIL_HDR + escapestring(test) + QUOTE_SPACE + XalanDOMString(REASON_EQUALS_QUOTE) + escapestring(reason)  + QUOTE_SOLIDUS_GREATER_THAN);
+
+    }
+}
+
+
+void 
+XMLFileReporter::logCheckErr(const XalanDOMString& comment)
+{
+    if (isReady())
+    {
+        printToFile(CHECKERRR_HDR + escapestring(comment) + QUOTE_SOLIDUS_GREATER_THAN);
+    }
+}
+
+
+
+static const XalanDOMChar	theAmpersandString[] =
+{
+	XalanUnicode::charAmpersand,
+	XalanUnicode::charLetter_a,
+	XalanUnicode::charLetter_m,
+	XalanUnicode::charLetter_p,
+	XalanUnicode::charSemicolon,
+	0
+};
+
+
+
+static const XalanDOMChar	theApostropheString[] =
+{
+	XalanUnicode::charAmpersand,
+	XalanUnicode::charLetter_a,
+	XalanUnicode::charLetter_p,
+	XalanUnicode::charLetter_o,
+	XalanUnicode::charLetter_s,
+	XalanUnicode::charSemicolon,
+	0
+};
+
+
+
+static const XalanDOMChar	theLessThanString[] =
+{
+	XalanUnicode::charAmpersand,
+	XalanUnicode::charLetter_l,
+	XalanUnicode::charLetter_t,
+	XalanUnicode::charSemicolon,
+	0
+};
+
+
+
+static const XalanDOMChar	theGreaterThanString[] =
+{
+	XalanUnicode::charAmpersand,
+	XalanUnicode::charLetter_g,
+	XalanUnicode::charLetter_t,
+	XalanUnicode::charSemicolon,
+	0
+};
+
+
+
+static const XalanDOMChar	theQuoteString[] =
+{
+	XalanUnicode::charAmpersand,
+	XalanUnicode::charLetter_q,
+	XalanUnicode::charLetter_u,
+	XalanUnicode::charLetter_o,
+	XalanUnicode::charLetter_t,
+	XalanUnicode::charSemicolon,
+	0
+};
+
+
+
+XalanDOMString
+XMLFileReporter::escapestring(const XalanDOMString&  s)
+{
+    XalanDOMString		sb;
+
+    const XalanDOMString::size_type		length = s.length();
+
+	sb.reserve(length);
+
+    for (XalanDOMString::size_type i = 0; i < length; i++)
+    {
+        const XalanDOMChar	ch = charAt(s, i);
+
+        if (XalanUnicode::charLessThanSign == ch)
+        {
+			append(sb, theLessThanString);
+        }
+        else if (XalanUnicode::charGreaterThanSign == ch)
+        {
+			append(sb, theGreaterThanString);
+        }
+		else if (XalanUnicode::charAmpersand == ch) 
+		{
+			append(sb, theAmpersandString);
+		}
+		else if (XalanUnicode::charQuoteMark == ch) 
+		{
+			append(sb, theQuoteString);
+		}
+		else if (XalanUnicode::charApostrophe == ch) 
+		{
+			append(sb, theApostropheString);
+		}
+        else
+        {
+            append(sb, ch);
+        }
+    }
+
+	return sb;
+}
+
+
+
+bool 
+XMLFileReporter::startResultsFile()
+{
+    if (isReady())
+    {
+        // Write out XML header and root test result element
+        printToFile(XML_HEADER);
+
+        // Note: this tag is closed in our .close() method, which the caller had better call!
+        printToFile(LESS_THAN + ELEM_RESULTSFILE + SPACE + ATTR_FILENAME + EQUALS_QUOTE + m_fileName + QUOTE_GREATER_THAN);
+
+        return true;
+    }
+    else
+	{
+        return false;
+	}
+}
+
+
+
+bool 
+XMLFileReporter::closeResultsFile()
+{
+    if (isReady() == false)
+	{
+        return false;
+	}
+	else
+    {            
+		printToFile(LESS_THAN_SOLIDUS + ELEM_RESULTSFILE + GREATER_THAN);
+        return true;
+    }
+}
+
+
+bool 
+XMLFileReporter::printToFile(const XalanDOMString&	output) 
+{
+    if (isReady() == false)
+	{
+		return false;
+	}
+	else
+    {
+		const CharVectorType	theResult(TranscodeToLocalCodePage(output));
+
+		if(!theResult.size())
+		{
+			fputs("Error transcoding text to local codepage", m_fileHandle);
+		}
+		else 
+		{
+			fputs(c_str(theResult), m_fileHandle);
+		}
+
+		fputs("\n", m_fileHandle);
+
+        return true;
+    }
+}
+
+
+
+XalanDOMString 
+XMLFileReporter::getDateTimeString() 
+{
+#if defined(XALAN_STRICT_ANSI_HEADERS)
+	using std::tm;
+	using std::time;
+	using std::localtime;
+	using std::asctime;
+	using std::strlen;
+#endif
+
+	struct tm *tmNow;
+	time_t time_tNow;
+
+	time(&time_tNow);     
+	tmNow = localtime(&time_tNow);
+	
+	const char* const	theTime = asctime(tmNow);
+
+	return XalanDOMString(theTime, strlen(theTime) - 1);
+}
+
+
+
+void
+XMLFileReporter::initStrings()
+{
+	OPT_FILENAME = XALAN_STATIC_UCODE_STRING("filename");
+	ELEM_RESULTSFILE = XALAN_STATIC_UCODE_STRING("resultsfile");
+	ELEM_TESTFILE = XALAN_STATIC_UCODE_STRING("testfile");
+	ELEM_FILERESULT = XALAN_STATIC_UCODE_STRING("fileresult");
+	ELEM_TESTCASE = XALAN_STATIC_UCODE_STRING("Test_Dir");
+	ELEM_CASERESULT = XALAN_STATIC_UCODE_STRING("Dir-result");
+	ELEM_CHECKRESULT = XALAN_STATIC_UCODE_STRING("Testcase");
+	ELEM_STATISTIC = XALAN_STATIC_UCODE_STRING("statistic");
+	ELEM_LONGVAL = XALAN_STATIC_UCODE_STRING("longval");
+	ELEM_DOUBLEVAL = XALAN_STATIC_UCODE_STRING("doubleval");
+	ELEM_MESSAGE = XALAN_STATIC_UCODE_STRING("message");
+	ELEM_ARBITRARY = XALAN_STATIC_UCODE_STRING("arbitrary");
+	ELEM_HASHTABLE = XALAN_STATIC_UCODE_STRING("hashtable");
+	ELEM_HASHITEM = XALAN_STATIC_UCODE_STRING("hashitem");
+	ATTR_LEVEL = XALAN_STATIC_UCODE_STRING("level");
+	ATTR_DESC = XALAN_STATIC_UCODE_STRING("desc");
+	ATTR_TIME = XALAN_STATIC_UCODE_STRING("time");
+	ATTR_RESULT = XALAN_STATIC_UCODE_STRING("result");
+	ATTR_KEY = XALAN_STATIC_UCODE_STRING("key");
+	ATTR_FILENAME = OPT_FILENAME;
+	LESS_THAN = XALAN_STATIC_UCODE_STRING("<");
+	GREATER_THAN = XALAN_STATIC_UCODE_STRING(">");
+	EQUALS_QUOTE = XALAN_STATIC_UCODE_STRING("=\"");
+	SPACE = XALAN_STATIC_UCODE_STRING(" ");
+	QUOTE = XALAN_STATIC_UCODE_STRING("\"");
+	QUOTE_SPACE = XALAN_STATIC_UCODE_STRING("\" ");
+	QUOTE_GREATER_THAN = XALAN_STATIC_UCODE_STRING("\">");
+	QUOTE_SOLIDUS_GREATER_THAN = XALAN_STATIC_UCODE_STRING("\"/>");
+	PASS = XALAN_STATIC_UCODE_STRING("PASS");
+	AMBG = XALAN_STATIC_UCODE_STRING("AMBG");
+	ERRR = XALAN_STATIC_UCODE_STRING("ERRR");
+	FAIL = XALAN_STATIC_UCODE_STRING("FAIL");
+	LESS_THAN_SOLIDUS = XALAN_STATIC_UCODE_STRING("</");
+	XML_HEADER = XALAN_STATIC_UCODE_STRING("<?xml version=\"1.0\"?>");
+	REASON_EQUALS_QUOTE = XALAN_STATIC_UCODE_STRING("reason=\"");
+
+	TESTCASEINIT_HDR = LESS_THAN + ELEM_TESTCASE + SPACE + ATTR_DESC + EQUALS_QUOTE;
+	TESTCASECLOSE_HDR = LESS_THAN + ELEM_CASERESULT + SPACE + ATTR_DESC + EQUALS_QUOTE;
+	MESSAGE_HDR = LESS_THAN + ELEM_MESSAGE + SPACE + ATTR_LEVEL + EQUALS_QUOTE;
+	STATISTIC_HDR = LESS_THAN + ELEM_STATISTIC + SPACE + ATTR_LEVEL + EQUALS_QUOTE;
+	ARBITRARY_HDR = LESS_THAN + ELEM_ARBITRARY + SPACE + ATTR_LEVEL + EQUALS_QUOTE;
+	HASHTABLE_HDR = LESS_THAN + ELEM_HASHTABLE + SPACE + ATTR_LEVEL + EQUALS_QUOTE;
+	HASHITEM_HDR = LESS_THAN + ELEM_HASHITEM + SPACE + ATTR_KEY + EQUALS_QUOTE;
+	CHECKPASS_HDR = LESS_THAN + ELEM_CHECKRESULT + SPACE + ATTR_RESULT + EQUALS_QUOTE + PASS + QUOTE_SPACE + ATTR_DESC + EQUALS_QUOTE;
+	CHECKAMBG_HDR = LESS_THAN + ELEM_CHECKRESULT + SPACE + ATTR_RESULT + EQUALS_QUOTE + AMBG + QUOTE_SPACE + ATTR_DESC + EQUALS_QUOTE;
+	CHECKERRR_HDR = LESS_THAN + ELEM_CHECKRESULT + SPACE + ATTR_RESULT + EQUALS_QUOTE + ERRR + QUOTE_SPACE + ATTR_DESC + EQUALS_QUOTE;
+	CHECKFAIL_HDR = LESS_THAN + ELEM_CHECKRESULT + SPACE + ATTR_RESULT + EQUALS_QUOTE + FAIL + QUOTE_SPACE + ATTR_DESC + EQUALS_QUOTE;
+	CHECKFAIL_FTR = LESS_THAN_SOLIDUS + ELEM_CHECKRESULT + GREATER_THAN;
+}
+
+
+
+XALAN_CPP_NAMESPACE_END
--- xalan-1.10.orig/c/Tests/Harness/Harness.dsp
+++ xalan-1.10/c/Tests/Harness/Harness.dsp
@@ -0,0 +1,258 @@
+# Microsoft Developer Studio Project File - Name="Harness" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=Harness - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "Harness.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "Harness.mak" CFG="Harness - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "Harness - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "Harness - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "Harness - Win32 Release with symbols" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "Harness - Win64 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "Harness - Win64 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "Harness - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\Build\Win32\VC6\Release"
+# PROP Intermediate_Dir "..\..\Build\Win32\VC6\Release\Harness"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HARNESS_EXPORTS" /Yu"stdafx.h" /FD /c
+# ADD CPP /nologo /MD /W4 /GR /GX /O2 /Ob2 /I "..\..\..\..\xml-xerces\c\src" /I "..\..\src\\" /I ".." /I "$(XERCESCROOT)\src" /I "$(XERCESCROOT)\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HARNESS_EXPORTS" /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+# ADD LINK32 xerces-c_2.lib /nologo /dll /pdb:none /machine:I386 /out:"..\..\Build\Win32\VC6\Release/Harness_1_8.dll" /implib:"..\..\Build\Win32\VC6\Release/Harness_1.lib" /libpath:"..\..\..\..\xml-xerces\c\Build\Win32\VC6\Release" /libpath:"$(XERCESCROOT)\Build\Win32\VC6\Release" /libpath:"$(XERCESCROOT)\lib"
+
+!ELSEIF  "$(CFG)" == "Harness - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\Build\Win32\VC6\Debug"
+# PROP Intermediate_Dir "..\..\Build\Win32\VC6\Debug\Harness"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HARNESS_EXPORTS" /Yu"stdafx.h" /FD /GZ /c
+# ADD CPP /nologo /MDd /W4 /Gm /GR /GX /Zi /Od /Gf /Gy /I "..\..\..\..\xml-xerces\c\src" /I "..\..\src\\" /I ".." /I "$(XERCESCROOT)\src" /I "$(XERCESCROOT)\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HARNESS_EXPORTS" /Yc /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 xerces-c_2D.lib /nologo /dll /debug /machine:I386 /out:"..\..\Build\Win32\VC6\Debug/Harness_1_8D.dll" /implib:"..\..\Build\Win32\VC6\Debug/Harness_1D.lib" /pdbtype:sept /libpath:"..\..\..\..\xml-xerces\c\Build\Win32\VC6\Debug" /libpath:"$(XERCESCROOT)\Build\Win32\VC6\Debug" /libpath:"$(XERCESCROOT)\lib"
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF  "$(CFG)" == "Harness - Win32 Release with symbols"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Harness___Win32_Release_with_symbols"
+# PROP BASE Intermediate_Dir "Harness___Win32_Release_with_symbols"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\Build\Win32\VC6\Release.symbols"
+# PROP Intermediate_Dir "..\..\Build\Win32\VC6\Release.symbols\Harness"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W4 /GR /GX /O2 /Ob2 /I "..\..\..\..\xml-xerces\c\src" /I "..\..\src\\" /I "..\harness\\" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HARNESS_EXPORTS" /FD /c
+# ADD CPP /nologo /MD /W4 /GR /GX /Zi /O2 /Ob2 /I "..\..\..\..\xml-xerces\c\src" /I "..\..\src\\" /I ".." /I "$(XERCESCROOT)\src" /I "$(XERCESCROOT)\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HARNESS_EXPORTS" /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 ..\..\..\..\xml-xerces\c\Build\Win32\VC6\Release\xerces-c_1.lib ..\..\Build\Win32\VC6\Release\PlatformSupport.lib ..\..\Build\Win32\VC6\Release\XalanDOM.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /machine:I386
+# SUBTRACT BASE LINK32 /debug
+# ADD LINK32 xerces-c_2.lib /nologo /dll /debug /machine:I386 /out:"..\..\Build\Win32\VC6\Release.symbols/Harness_1_8S.dll" /implib:"..\..\Build\Win32\VC6\Release.symbols/Harness_1S.lib" /libpath:"..\..\..\..\xml-xerces\c\Build\Win32\VC6\Release" /libpath:"$(XERCESCROOT)\Build\Win32\VC6\Release" /libpath:"$(XERCESCROOT)\lib"
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF  "$(CFG)" == "Harness - Win64 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\Build\Win64\VC6\Release"
+# PROP Intermediate_Dir "..\..\Build\Win64\VC6\Release\Harness"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HARNESS_EXPORTS" /Yu"stdafx.h" /FD /c
+# ADD CPP /nologo /MD /W4 /GR /GX /O2 /Ob2 /I "..\..\..\..\xml-xerces\c\src" /I "..\..\src\\" /I ".." /I "$(XERCESCROOT)\src" /I "$(XERCESCROOT)\include" /D "WIN64" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HARNESS_EXPORTS" /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+# ADD LINK32 xerces-c_2.lib /nologo /dll /pdb:none /machine:IX86 /out:"..\..\Build\Win64\VC6\Release/Harness_1_8.dll" /implib:"..\..\Build\Win64\VC6\Release/Harness_1.lib" /libpath:"..\..\..\..\xml-xerces\c\Build\Win64\VC6\Release" /libpath:"$(XERCESCROOT)\Build\Win64\VC6\Release" /libpath:"$(XERCESCROOT)\lib" /machine:IA64
+
+!ELSEIF  "$(CFG)" == "Harness - Win64 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\Build\Win64\VC6\Debug"
+# PROP Intermediate_Dir "..\..\Build\Win64\VC6\Debug\Harness"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HARNESS_EXPORTS" /Yu"stdafx.h" /FD /GZ /c
+# ADD CPP /nologo /MDd /W4 /Gm /GR /GX /Zi /Od /Gf /Gy /I "..\..\..\..\xml-xerces\c\src" /I "..\..\src\\" /I ".." /I "$(XERCESCROOT)\src" /I "$(XERCESCROOT)\include" /D "WIN64" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HARNESS_EXPORTS" /Yc /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 xerces-c_2D.lib /nologo /dll /debug /machine:IX86 /out:"..\..\Build\Win64\VC6\Debug/Harness_1_8D.dll" /implib:"..\..\Build\Win64\VC6\Debug/Harness_1D.lib" /pdbtype:sept /libpath:"..\..\..\..\xml-xerces\c\Build\Win64\VC6\Debug" /libpath:"$(XERCESCROOT)\Build\Win64\VC6\Debug" /libpath:"$(XERCESCROOT)\lib" /machine:IA64
+# SUBTRACT LINK32 /pdb:none
+
+!ENDIF 
+
+# Begin Target
+
+# Name "Harness - Win32 Release"
+# Name "Harness - Win32 Debug"
+# Name "Harness - Win32 Release with symbols"
+# Name "Harness - Win64 Release"
+# Name "Harness - Win64 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\FileUtility.cpp
+
+!IF  "$(CFG)" == "Harness - Win32 Release"
+
+!ELSEIF  "$(CFG)" == "Harness - Win32 Debug"
+
+# ADD CPP /YX
+
+!ELSEIF  "$(CFG)" == "Harness - Win32 Release with symbols"
+
+!ELSEIF  "$(CFG)" == "Harness - Win64 Release"
+
+!ELSEIF  "$(CFG)" == "Harness - Win64 Debug"
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\HarnessInit.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\XMLFileReporter.cpp
+
+!IF  "$(CFG)" == "Harness - Win32 Release"
+
+!ELSEIF  "$(CFG)" == "Harness - Win32 Debug"
+
+# ADD CPP /YX
+
+!ELSEIF  "$(CFG)" == "Harness - Win32 Release with symbols"
+
+!ELSEIF  "$(CFG)" == "Harness - Win64 Release"
+
+!ELSEIF  "$(CFG)" == "Harness - Win64 Debug"
+
+!ENDIF 
+
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\FileUtility.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\HarnessDefinitions.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\HarnessInit.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\XMLFileReporter.hpp
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\Harness.rc
+# End Source File
+# Begin Source File
+
+SOURCE=.\resource.h
+# End Source File
+# End Group
+# End Target
+# End Project
--- xalan-1.10.orig/c/Tests/Harness/resource.h
+++ xalan-1.10/c/Tests/Harness/resource.h
@@ -0,0 +1,16 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by Harness.rc
+//
+#define DummyString                     1
+
+// Next default values for new objects
+// 
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE        101
+#define _APS_NEXT_COMMAND_VALUE         40001
+#define _APS_NEXT_CONTROL_VALUE         1000
+#define _APS_NEXT_SYMED_VALUE           101
+#endif
+#endif
--- xalan-1.10.orig/c/Tests/Harness/FileUtility.hpp
+++ xalan-1.10/c/Tests/Harness/FileUtility.hpp
@@ -0,0 +1,432 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#if !defined(FILEUTILITY_HEADER_GUARD_1357924680)
+#define FILEUTILITY_HEADER_GUARD_1357924680
+
+#include <Harness/HarnessDefinitions.hpp>
+
+
+
+#include <vector>
+
+
+#if defined(XALAN_CLASSIC_IOSTREAMS)
+#include <strstream.h>
+#else
+#include <strstream>
+#endif
+
+
+
+#include <xalanc/XalanDOM/XalanDOMString.hpp>
+
+
+
+XALAN_CPP_NAMESPACE_BEGIN
+
+
+
+class FormatterListener;
+class PrintWriter;
+class StylesheetRoot;
+class XalanCompiledStylesheet;
+class XalanDocument;
+class XalanNode;
+class XalanSourceTreeDocument;
+class XalanTransformer;
+class XMLFileReporter;
+class XSLTInputSource;
+
+
+
+// This class is exported from the Harness.dll
+class HARNESS_API FileUtility 
+{
+public:
+
+// A vector to hold directory names and file names.
+#if defined(XALAN_NO_STD_NAMESPACE)
+    typedef vector<XalanDOMString>          FileNameVectorType;
+#else
+    typedef std::vector<XalanDOMString>     FileNameVectorType;
+#endif
+
+    /**
+     * Initialize static data.
+     * Should be called only once per process before creating any
+     * instances of FileUtility.
+     */
+    static void
+    initialize();
+
+    /**
+     * Clean-up static data.
+     * Should be called only once per process after deleting all
+     * instances of FileUtility.
+     */
+    static void
+    terminate();
+
+    struct HARNESS_API reportStruct
+    {
+        XalanDOMString  theDrive;
+        XalanDOMString  testOrFile;
+        XalanDOMString  xmlFileURL;
+        XalanDOMString  xslFileURL;
+        XalanDOMString  xmlFormat;
+        const char*     msg;
+        XalanDOMString  currentNode;
+        XalanDOMString  actual;
+        XalanDOMString  expected;
+        int             pass;
+        int             fail;
+        int             nogold;
+
+        reportStruct();
+
+        void
+        reset();
+
+    } data;
+
+    struct HARNESS_API cmdParams
+    {
+    private:
+
+#if defined(XALAN_NO_STD_NAMESPACE)
+        typedef ostrstream          StreamType;
+#else
+        typedef std::ostrstream     StreamType;
+#endif
+
+        StreamType  help;
+
+    public:
+
+        XalanDOMString  base;
+        XalanDOMString  output;
+        XalanDOMString  gold;
+        XalanDOMString  sub;
+        int             source;
+        bool            skip;
+        long            iters;
+
+
+        cmdParams();
+
+        ~cmdParams()
+        {
+        }
+
+        const char*
+        getHelpMessage();
+
+        StreamType&
+        getHelpStream()
+        {
+            return help;
+        }
+
+    } args;
+
+    /** Simple constructor, does not perform initialization.  */
+    FileUtility();
+    
+    /** 
+    * Utility method used to get test files from a specific directory.
+    * @returns a vector containing test files.
+    */
+
+    XalanDOMString
+    getDrive();
+
+    bool
+    getParams(
+            int             argc,
+            char*           argv[],
+            const char*     outDir,
+            bool            fsetGold = true);
+
+
+    FileNameVectorType
+    getTestFileNames(
+            const XalanDOMString&   baseDir,
+            const XalanDOMString&   relDir,
+            bool                    useDirPrefix);
+
+    /** 
+    * Utility method used to get subdirectories from a specific directory.
+    * @returns a vector containing directory files.
+    */  
+    FileNameVectorType
+    getDirectoryNames(const XalanDOMString&     rootDirectory);
+
+    /** 
+    * Utility method used to create default directories when neccessary
+    */
+    void
+    checkAndCreateDir(const XalanDOMString&     directory);
+
+    /** 
+    * Utility method determines if directory exists.
+    */
+    bool
+    checkDir(const XalanDOMString&  directory);
+
+    /** 
+    * Utility method used to get XSL file based on XML file.
+    * @returns a XalanDOMString.
+    */
+    XalanDOMString
+    getXSLFileName(const XalanDOMString&    theXMLFileName);
+
+    /** 
+    * Utility method used to get OUT file based on XML file.
+    * @returns a XalanDOMString.
+    */
+    XalanDOMString
+    generateFileName(
+            const XalanDOMString&  theXMLFileName,
+            const char*             suffix,
+            bool*                   status = 0);
+
+    /** 
+    * Utility method used to generate UniqRunid.
+    * @returns a XalanDOMString.
+    */
+    XalanDOMString
+    generateUniqRunid();
+
+    /** 
+    * Utility methods used to get Xerces Version number.
+    * @returns a XalanDOMString.
+    */
+    XalanDOMString
+    getXercesVersion();
+
+
+    void
+    checkResults(
+            const XalanDOMString&   outputFile, 
+            const XalanDOMString&   goldFile, 
+            XMLFileReporter&        logfile);
+
+    void
+    checkAPIResults(
+            const XalanDOMString&   actual, 
+            const XalanDOMString&   expected,
+            const char*             msg,
+            XMLFileReporter&        logfile,
+            const XalanDOMString&   outputFile,
+            const XalanDOMString&   goldFile,
+            bool                    containsOnly = false);
+
+    void
+    checkAPIResults(
+            const char*             actual,
+            const char*             expected,
+            const char*             msg,
+            XMLFileReporter&        logfile,
+            const XalanDOMString&   outputFile,
+            const XalanDOMString&   goldFile,
+            bool                    containsOnly = false)
+    {
+        checkAPIResults(
+            XalanDOMString(actual), 
+            XalanDOMString(expected),
+            msg,
+            logfile,
+            outputFile,
+            goldFile,
+            containsOnly);
+    }
+
+    /**
+    * Utility method used to compare the results. It inturn
+    * call domCompare.  
+    * @returns Void.
+    */
+    void
+    checkDOMResults(
+            const XalanDOMString&           theOutputFile, 
+            const XalanCompiledStylesheet*  compiledSS,
+            const XalanSourceTreeDocument*  dom,
+            const XSLTInputSource&          goldInputSource,
+            XMLFileReporter&                logfile);
+
+    bool
+    compareSerializedResults(
+            const XalanDOMString&   transformResult,
+            const XalanDOMString&   goldInputSource);
+    /**
+    * Utility method used to create a FormatterToXML FormatterListener.
+    * This is required to DOM comparisions. 
+    * @returns a pointer to a FormatterListener.
+    */
+    FormatterListener* 
+    getXMLFormatter(
+            PrintWriter&            resultWriter,
+            int                     indentAmount,
+            const XalanDOMString&   mimeEncoding,
+            const StylesheetRoot*   stylesheet);
+
+
+    bool
+    fileCompare(
+            const char*     goldFile,
+            const char*     outputFile);
+
+    /** 
+    * Utility methods used to perform a DOM Compare
+    * @returns boolean
+    */
+    bool 
+    domCompare(const XalanNode& gold, const XalanNode& doc);
+
+    /** 
+    * Utility methods used to perform a DOM Compare
+    * @returns boolean
+    */
+    bool 
+    domCompare(
+            const XalanDocument&    gold,
+            const XalanDocument&    doc);
+
+    /** 
+    * Utility methods used to diff two Element nodes.
+    * @returns boolean.
+    */
+    bool 
+    diffElement(const XalanNode& gold, const XalanNode& doc);
+
+    /** 
+    * Utility methods used to diff two nodes.
+    * @returns true if the nodes are equal, and false if not.
+    */
+    bool
+    diffNode(
+            const XalanNode&    gold,
+            const XalanNode&    doc);
+
+    /** 
+    * Utility methods used to diff two nodes.
+    * @returns true if the nodes are equal, and false if not.
+    */
+    bool
+    diffNode(
+            const XalanNode*    gold,
+            const XalanNode*    doc);
+
+    /** 
+    * Utility methods used to diff two Element nodes.
+    * @returns boolean.
+    */
+    bool 
+    diffElement2(
+            const XalanNode&    gold,
+            const XalanNode&    doc);
+
+    /** 
+    * Utility methods used to diff two attribute nodes.
+    * @returns boolean.
+    */
+    bool 
+    diffAttr(const XalanNode* gAttr, const XalanNode* dAttr);
+
+    /** 
+    * Utility methods used to report Pass/Fail numbers.
+    * @returns void.
+    */
+    void
+    reportPassFail(XMLFileReporter& logfile);
+
+    void
+    reportPassFail(XMLFileReporter& logfile, const XalanDOMString& runid);
+
+    void
+    analyzeResults(XalanTransformer& xalan, const XalanDOMString& resultsFile);
+
+    static const XalanDOMString&    s_xmlSuffix;
+
+    static const XalanDOMString&    s_pathSep;
+
+private:
+
+    static const XalanDOMString     s_emptyString;
+
+    XalanDOMString
+    getProgramName(const char* fullName);
+
+    /** 
+    * Utility methods used to collect information about compare failures.
+    * @returns void.
+    */
+    void 
+    collectData(
+            const char*             errmsg,
+            const XalanDOMString&   currentnode,
+            const XalanDOMString&   actdata,
+            const XalanDOMString&   expdata);
+
+    /** 
+    * Utility methods used to report DOM compare errors.
+    * @returns void.
+    */
+    void
+    reportError();
+
+#if defined(NDEBUG)
+    void
+    debugNodeData(const XalanDOMString&     /* value */) const
+    {
+    }
+
+    void
+    debugNodeData(
+            const XalanDOMString&   /* node */,
+            const XalanDOMString&   /* value */) const
+    {
+    }
+
+    void
+    debugAttributeData(const XalanDOMString&    /* value */) const
+    {
+    }
+
+#else
+
+    void
+    debugNodeData(const XalanDOMString&     value) const;
+
+    void
+    debugNodeData(
+            const XalanDOMString&   node,
+            const XalanDOMString&   value) const;
+
+    void
+    debugAttributeData(const XalanDOMString&    value) const;
+
+#endif
+
+};        // end of class FileUtility
+
+
+
+XALAN_CPP_NAMESPACE_END
+
+
+
+#endif
--- xalan-1.10.orig/c/Tests/Harness/HarnessDefinitions.hpp
+++ xalan-1.10/c/Tests/Harness/HarnessDefinitions.hpp
@@ -0,0 +1,30 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#if !defined(HARNESSDEFINITIONS_HEADER_GUARD_1357924680)
+#define HARNESSDEFINITIONS_HEADER_GUARD_1357924680
+
+#include <xalanc/Include/PlatformDefinitions.hpp>
+
+#if defined(HARNESS_EXPORTS)
+#	define HARNESS_API XALAN_PLATFORM_EXPORT
+#	define HARNESS_API_FUNCTION(T) XALAN_PLATFORM_EXPORT_FUNCTION(T)
+#else
+#	define HARNESS_API XALAN_PLATFORM_IMPORT
+#	define HARNESS_API_FUNCTION(T) XALAN_PLATFORM_IMPORT_FUNCTION(T)
+#endif
+
+
+#endif	// HARNESSDEFINITIONS_HEADER_GUARD_1357924680
--- xalan-1.10.orig/c/Tests/Harness/HarnessInit.hpp
+++ xalan-1.10/c/Tests/Harness/HarnessInit.hpp
@@ -0,0 +1,44 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#if !defined(HARNESSINIT_HEADER_GUARD_1357924690)
+#define HARNESSINIT_HEADER_GUARD_1357924690
+
+#include <Harness/HarnessDefinitions.hpp>
+
+
+
+XALAN_CPP_NAMESPACE_BEGIN
+
+
+
+// This class is exported from the Harness.dll
+class HARNESS_API HarnessInit 
+{
+public:
+
+	/** Simple constructor, performs initialization.  */
+	HarnessInit();
+
+	~HarnessInit();
+};
+
+
+
+XALAN_CPP_NAMESPACE_END
+
+
+
+#endif
--- xalan-1.10.orig/c/Tests/Harness/Harness.vcproj
+++ xalan-1.10/c/Tests/Harness/Harness.vcproj
@@ -0,0 +1,249 @@
+<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.00"
+	Name="Harness"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\..\..\Build\Win32\VC7\Debug"
+			IntermediateDirectory=".\..\..\Build\Win32\VC7\Debug\Harness"
+			ConfigurationType="2"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\..\xml-xerces\c\src,..\..\src\,..;$(XERCESCROOT)\include;$(XERCESCROOT)\src"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;HARNESS_EXPORTS"
+				StringPooling="TRUE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				EnableFunctionLevelLinking="TRUE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="1"
+				PrecompiledHeaderThrough=""
+				PrecompiledHeaderFile=".\..\..\Build\Win32\VC7\Debug\Harness/Harness.pch"
+				AssemblerListingLocation=".\..\..\Build\Win32\VC7\Debug\Harness/"
+				ObjectFile=".\..\..\Build\Win32\VC7\Debug\Harness/"
+				ProgramDataBaseFileName=".\..\..\Build\Win32\VC7\Debug\Harness/"
+				WarningLevel="4"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalOptions="/MACHINE:I386"
+				AdditionalDependencies="xerces-c_2D.lib"
+				OutputFile="..\..\Build\Win32\VC7\Debug/Harness_1_8D.dll"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories="..\..\..\..\xml-xerces\c\Build\Win32\VC7\Debug;$(XERCESCROOT)\Build\Win32\VC7\Debug;$(XERCESCROOT)\lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\..\..\Build\Win32\VC7\Debug/Harness_1_8D.pdb"
+				ImportLibrary="..\..\Build\Win32\VC7\Debug/Harness_1D.lib"/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="TRUE"
+				SuppressStartupBanner="TRUE"
+				TargetEnvironment="1"
+				TypeLibraryName=".\..\..\Build\Win32\VC7\Debug/Harness.tlb"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\..\..\Build\Win32\VC7\Release"
+			IntermediateDirectory=".\..\..\Build\Win32\VC7\Release\Harness"
+			ConfigurationType="2"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="2"
+				AdditionalIncludeDirectories="..\..\..\..\xml-xerces\c\src,..\..\src\,..;$(XERCESCROOT)\include;$(XERCESCROOT)\src"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;HARNESS_EXPORTS"
+				StringPooling="TRUE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				RuntimeTypeInfo="TRUE"
+				PrecompiledHeaderFile=".\..\..\Build\Win32\VC7\Release\Harness/Harness.pch"
+				AssemblerListingLocation=".\..\..\Build\Win32\VC7\Release\Harness/"
+				ObjectFile=".\..\..\Build\Win32\VC7\Release\Harness/"
+				ProgramDataBaseFileName=".\..\..\Build\Win32\VC7\Release\Harness/"
+				WarningLevel="4"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalOptions="/MACHINE:I386"
+				AdditionalDependencies="xerces-c_2.lib"
+				OutputFile="..\..\Build\Win32\VC7\Release/Harness_1_8.dll"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories="..\..\..\..\xml-xerces\c\Build\Win32\VC7\Release;$(XERCESCROOT)\Build\Win32\VC7\Release;$(XERCESCROOT)\lib"
+				ImportLibrary="..\..\Build\Win32\VC7\Release/Harness_1.lib"/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="TRUE"
+				SuppressStartupBanner="TRUE"
+				TargetEnvironment="1"
+				TypeLibraryName=".\..\..\Build\Win32\VC7\Release/Harness.tlb"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release with symbols|Win32"
+			OutputDirectory=".\..\..\Build\Win32\VC7\Release.symbols"
+			IntermediateDirectory=".\..\..\Build\Win32\VC7\Release.symbols\Harness"
+			ConfigurationType="2"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="2"
+				AdditionalIncludeDirectories="..\..\..\..\xml-xerces\c\src,..\..\src\,..;$(XERCESCROOT)\include;$(XERCESCROOT)\src"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;HARNESS_EXPORTS"
+				StringPooling="TRUE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				RuntimeTypeInfo="TRUE"
+				PrecompiledHeaderFile=".\..\..\Build\Win32\VC7\Release.symbols\Harness/Harness.pch"
+				AssemblerListingLocation=".\..\..\Build\Win32\VC7\Release.symbols\Harness/"
+				ObjectFile=".\..\..\Build\Win32\VC7\Release.symbols\Harness/"
+				ProgramDataBaseFileName=".\..\..\Build\Win32\VC7\Release.symbols\Harness/"
+				WarningLevel="4"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalOptions="/MACHINE:I386"
+				AdditionalDependencies="xerces-c_2.lib"
+				OutputFile="..\..\Build\Win32\VC7\Release.symbols/Harness_1_8S.dll"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories="..\..\..\..\xml-xerces\c\Build\Win32\VC7\Release;$(XERCESCROOT)\Build\Win32\VC7\Release;$(XERCESCROOT)\lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\..\..\Build\Win32\VC7\Release.symbols/Harness_1_8S.pdb"
+				ImportLibrary="..\..\Build\Win32\VC7\Release.symbols/Harness_1S.lib"/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="TRUE"
+				SuppressStartupBanner="TRUE"
+				TargetEnvironment="1"
+				TypeLibraryName=".\..\..\Build\Win32\VC7\Release.symbols/Harness.tlb"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+		</Configuration>
+	</Configurations>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath=".\FileUtility.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="2"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\HarnessInit.cpp">
+			</File>
+			<File
+				RelativePath=".\XMLFileReporter.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="2"/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath=".\FileUtility.hpp">
+			</File>
+			<File
+				RelativePath=".\HarnessDefinitions.hpp">
+			</File>
+			<File
+				RelativePath=".\HarnessInit.hpp">
+			</File>
+			<File
+				RelativePath=".\XMLFileReporter.hpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+			<File
+				RelativePath=".\Harness.rc">
+			</File>
+			<File
+				RelativePath=".\resource.h">
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
--- xalan-1.10.orig/c/Tests/Harness/HarnessInit.cpp
+++ xalan-1.10/c/Tests/Harness/HarnessInit.cpp
@@ -0,0 +1,59 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "HarnessInit.hpp"
+
+
+
+#include <xalanc/XalanDOM/XalanDOMInit.hpp>
+
+
+
+#include "FileUtility.hpp"
+
+
+
+XALAN_CPP_NAMESPACE_BEGIN
+
+
+
+static const XalanDOMInit*	s_xalanDOMInit = 0;
+
+
+
+HarnessInit::HarnessInit()
+{
+	assert(s_xalanDOMInit == 0);
+
+	s_xalanDOMInit = new XalanDOMInit;
+
+	FileUtility::initialize();
+}
+
+
+
+HarnessInit::~HarnessInit()
+{
+	FileUtility::terminate();
+
+	delete s_xalanDOMInit;
+
+	s_xalanDOMInit = 0;
+}
+
+
+
+XALAN_CPP_NAMESPACE_END
--- xalan-1.10.orig/c/Tests/Harness/FileUtility.cpp
+++ xalan-1.10/c/Tests/Harness/FileUtility.cpp
@@ -0,0 +1,1930 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "FileUtility.hpp"
+
+
+
+#include <cstdlib>
+#include <cstdio>
+#include <ctime>
+#include <vector>
+#include <climits>
+#include <cstring>
+
+#if defined(WIN32)
+#include <direct.h>
+#define PATH_MAX _MAX_PATH
+#define chdir _chdir
+#define getcwd _getcwd
+#define mkdir _mkdir
+#else
+#if !defined(PATH_MAX)
+#define PATH_MAX 2000
+#endif
+#define DIR_MODE_BITS 509
+#include <dirent.h>
+#include <unistd.h>
+extern "C" int mkdir(const char*, mode_t mode);
+#endif
+
+
+#if defined(XALAN_CLASSIC_IOSTREAMS)
+#include <iostream.h>
+#include <strstream.h>
+#else
+#include <iostream>
+#include <strstream>
+#endif
+
+#if !defined(NDEBUG) && defined(_MSC_VER)
+#include <crtdbg.h>
+#endif
+
+
+
+#include <xercesc/sax/SAXException.hpp>
+
+
+
+#include <xalanc/PlatformSupport/DirectoryEnumerator.hpp>
+#include <xalanc/PlatformSupport/DOMStringHelper.hpp>
+#include <xalanc/PlatformSupport/XalanOutputStreamPrintWriter.hpp>
+#include <xalanc/PlatformSupport/XalanFileOutputStream.hpp>
+
+
+
+#include <xalanc/XMLSupport/FormatterToXML.hpp>
+#include <xalanc/XMLSupport/FormatterTreeWalker.hpp>
+
+
+
+#include <xalanc/XalanSourceTree/XalanSourceTreeDOMSupport.hpp>
+#include <xalanc/XalanSourceTree/XalanSourceTreeParserLiaison.hpp>
+#include <xalanc/XalanSourceTree/XalanSourceTreeDocument.hpp>
+
+
+
+#include <xalanc/XSLT/StylesheetRoot.hpp>
+
+
+
+#include <xalanc/XalanTransformer/XalanCompiledStylesheet.hpp>
+#include <xalanc/XalanTransformer/XalanTransformer.hpp>
+
+
+
+#include "XMLFileReporter.hpp"
+
+
+
+XALAN_CPP_NAMESPACE_BEGIN
+
+
+
+
+const char* const   xalanNodeTypes[] =
+{
+    "UNKNOWN_NODE",
+    "ELEMENT_NODE",
+    "ATTRIBUTE_NODE",
+    "TEXT_NODE",
+    "CDATA_SECTION_NODE",
+    "ENTITY_REFERENCE_NODE",
+    "ENTITY_NODE",
+    "PROCESSING_INSTRUCTION_NODE",
+    "COMMENT_NODE",
+    "DOCUMENT_NODE",
+    "DOCUMENT_TYPE_NODE",
+    "DOCUMENT_FRAGMENT_NODE",
+    "NOTATION_NODE"
+};
+
+
+
+XALAN_USING_STD(cerr)
+XALAN_USING_STD(cout)
+XALAN_USING_STD(endl)
+
+
+const XalanDOMString    FileUtility::s_emptyString;
+
+
+
+FileUtility::reportStruct::reportStruct() :
+    theDrive(),
+    testOrFile(),
+    xmlFileURL(),
+    xslFileURL(),
+    xmlFormat(),
+    msg(0),
+    currentNode(),
+    actual(),
+    expected(),
+    pass(0),
+    fail(0),
+    nogold(0)
+{
+}
+
+
+
+void
+FileUtility::reportStruct::reset()
+{
+    clear(testOrFile);
+    msg = "";
+    clear(currentNode);
+    clear(actual);
+    clear(expected);
+}
+
+
+
+FileUtility::cmdParams::cmdParams() :
+    help(),
+    base(),
+    output(),
+    gold(),
+    sub(),
+    source(0),
+    skip(false),
+    iters(0)
+{
+}
+
+
+
+const char*
+FileUtility::cmdParams::getHelpMessage()
+{
+    help << '\0';
+
+    const char* const   data = help.str();
+
+#if defined(HPUX)
+   help.rdbuf() -> freeze(false);
+#else
+	help.freeze(false);
+#endif
+
+    return data;
+}
+
+
+
+FileUtility::FileUtility() :
+    data(),
+    args()
+{
+    cout << endl
+         << "Using Xalan version "
+         << XALAN_FULLVERSIONDOT
+         << endl
+         << "Using Xerces version "
+         << XERCES_FULLVERSIONDOT
+         << endl
+         << endl;
+}
+
+
+
+#if !defined(WIN32)
+XalanDOMString
+FileUtility::getDrive()
+{
+    return XalanDOMString();
+}
+#else
+XalanDOMString
+FileUtility::getDrive()
+{
+    const char temp[] =
+    {
+        char(_getdrive() + 'A' - 1),
+        ':',
+        '\0'
+    };
+    
+    return XalanDOMString(temp, sizeof(temp) - 1);
+}
+#endif
+
+
+bool
+FileUtility::getParams(
+            int             argc,
+            char*           argv[],
+            const char*     outDir,
+            bool            fsetGold)
+{
+    bool fSuccess = true;   // Used to continue argument loop
+    bool fsetOut = true;    // Set default output directory, set to false if data is provided
+
+    args.skip = true;       // Default values for performance testing parameters.
+    args.iters = 3;         
+
+    // Insure that required "-base" argument is there.
+    //
+    if (argc == 1 || argv[1][0] == '-')
+    {
+        cout << args.getHelpMessage();  
+        return false;
+    }
+    else
+    {
+        if (checkDir(XalanDOMString(argv[1])))
+        {
+            assign(args.base, XalanDOMString(argv[1]));
+        }
+        else
+        {
+            cout << endl << "Given base directory \"" << argv[1] << "\" does not exist" << endl;
+            cout << args.getHelpMessage();
+            return false;
+        }
+    }
+
+    // Get the rest of the arguments.
+    //
+    for (int i = 2; i < argc && fSuccess == true; ++i)
+    {
+        if(!stricmp("-out", argv[i]))
+        {
+            ++i;
+            if(i < argc && argv[i][0] != '-')
+            {
+                assign(args.output, XalanDOMString(argv[i]));
+                append(args.output, s_pathSep);
+                checkAndCreateDir(args.output);
+                fsetOut = false;
+            }
+            else
+            {
+                cout << args.getHelpMessage();
+                fSuccess = false;
+            }
+        }
+        else if(!stricmp("-gold", argv[i]))
+        {
+            ++i;
+            if(i < argc && argv[i][0] != '-')
+            {
+                assign(args.gold, XalanDOMString(argv[i]));
+
+                if ( !checkDir(args.gold) )
+                {   
+                    cout << "Given Gold dir - " << c_str(TranscodeToLocalCodePage(args.gold)) << " - does not exist" << endl;
+                    fSuccess = false;
+                }
+
+                append(args.gold, s_pathSep);
+                fsetGold = false;
+            }
+            else
+            {
+                cout << args.getHelpMessage();
+                fSuccess = false;
+            }
+        }
+        else if(!stricmp("-source", argv[i]))
+        {
+            ++i;
+            if(i < argc && argv[i][0] != '-')
+            {
+                if (stricmp(argv[i],"XPL") == 0)
+                {
+                    args.source = 1;
+                    outDir = "DOM-XALAN";
+                }
+                else if (stricmp(argv[i], "DOM") == 0)
+                {
+                    args.source = 2;
+                    outDir = "DOM-XERCES";
+                }
+                else
+                {
+                    cout << args.getHelpMessage();
+                    fSuccess = false;
+                }
+            }
+            else
+            {
+                cout << args.getHelpMessage();
+                fSuccess = false;
+            }
+        }
+        else if(!stricmp("-sub", argv[i]))
+        {
+            ++i;
+            if(i < argc && argv[i][0] != '-')
+            {
+                assign(args.sub, XalanDOMString(argv[i]));
+            }
+            else
+            {
+                cout << args.getHelpMessage();
+                fSuccess = false;
+            }
+        }
+        else if(!stricmp("-i", argv[i]))
+        {
+            args.skip = false;
+        }
+        else if(!stricmp("-iter", argv[i]))
+        {
+            ++i;
+            
+            // Make sure number is there and is greater then zero
+            if(i < argc && atol(argv[i]) > 0)
+            {
+                args.iters = atol(argv[i]);
+            }
+            else
+            {
+                cout << args.getHelpMessage();
+                fSuccess = false;
+            }
+        }
+        else
+        {
+            cout << args.getHelpMessage();
+            fSuccess = false;
+        }
+
+    } // End of for-loop
+
+    // Do we need to set the default output directory??
+    //
+    if (fsetOut)
+    { 
+        unsigned int ii = lastIndexOf(args.base,charAt(s_pathSep,0));
+
+        if (ii < length(args.base))
+        {
+            args.output.assign(args.base, 0, ii + 1);
+        }
+
+        append(args.output,XalanDOMString(outDir));
+        checkAndCreateDir(args.output);
+        append(args.output,s_pathSep); 
+
+    }
+    // Do we need to set the default gold directory??
+    //
+    if (fsetGold)
+    {
+        args.gold = args.base;
+        append(args.gold,XalanDOMString("-gold"));
+        if ( !checkDir(args.gold) )
+        {   
+            cout << "Assumed Gold dir - " << c_str(TranscodeToLocalCodePage(args.gold)) << " - does not exist" << endl;
+            fSuccess = false;
+        }
+        append(args.gold,s_pathSep);
+    }
+    
+    // Add the path seperator to the end of the base directory 
+    // here after we've finished using it for all directory creation.
+    //
+    append(args.base,s_pathSep);
+    
+    return fSuccess;
+}
+
+
+
+//  This routine retrieves test file names from specified directories.
+//  Inputs: baseDir:    typically "conf" or "perf"
+//          relDir:     sub-directory to search.
+//
+//  Notes:  It builds the searchSpecification by concatenating all the 
+//          necessary components.
+//
+FileUtility::FileNameVectorType
+FileUtility::getTestFileNames(
+            const XalanDOMString&   baseDir,
+            const XalanDOMString&   relDir,
+            bool                    useDirPrefix)
+{
+    const XalanDOMString    searchSuffix(XALAN_STATIC_UCODE_STRING("*.xsl"));
+    XalanDOMString  searchSpecification;
+
+    // Allow directory search w/o mandating files start with directory name. Required for files
+    // garnered from XSLTMARK performance directory exm.
+    if (useDirPrefix)
+    {
+        assign(searchSpecification, baseDir + relDir + s_pathSep + relDir + searchSuffix);
+    }
+    else
+    {
+        assign(searchSpecification, baseDir + relDir + s_pathSep + searchSuffix); 
+    }
+
+
+    DirectoryEnumeratorFunctor<FileNameVectorType, XalanDOMString>  theEnumerator;
+    FileNameVectorType  theFiles;
+    theEnumerator(searchSpecification, theFiles);
+
+    return theFiles;
+}
+
+/*  This routine retrieves all sub-directories from the specified directories.
+//  Inputs: rootDirectory:  typically "conf" or "perf"
+//
+//  Notes:  The searchSpecification in this case is just "*". 
+//                                                                          */  
+FileUtility::FileNameVectorType
+FileUtility::getDirectoryNames(const XalanDOMString&        rootDirectory)
+{
+    const XalanDOMString    dirSpec(XALAN_STATIC_UCODE_STRING("*"));
+
+    DirectoryEnumeratorFunctor<FileNameVectorType, XalanDOMString, DirectoryFilterPredicate> theEnumerator;
+    FileNameVectorType  theFiles;
+    theEnumerator(XalanDOMString(rootDirectory), XalanDOMString(dirSpec), theFiles);
+
+    return theFiles;
+}
+
+
+bool FileUtility::checkDir(const XalanDOMString&    directory )
+{
+    char buffer[PATH_MAX];
+
+    getcwd(buffer, PATH_MAX);
+
+    bool    fResult = false;
+
+    if ( !chdir(c_str(TranscodeToLocalCodePage(directory))) )
+    {
+        fResult = true;
+    }
+
+    chdir(buffer);
+
+    return fResult;
+}
+
+
+void FileUtility::checkAndCreateDir(const XalanDOMString&   directory)
+{
+    char buffer[PATH_MAX];
+
+    getcwd(buffer, PATH_MAX);
+
+    if ( (chdir(c_str(TranscodeToLocalCodePage(directory)))) )
+    {
+        //cout << "Couldn't change to " << directory << ", will create it." << endl;
+#if defined(WIN32)
+        if ( !mkdir(c_str(TranscodeToLocalCodePage(directory))))
+#else
+        if ( !mkdir(c_str(TranscodeToLocalCodePage(directory)), DIR_MODE_BITS))
+#endif
+        {
+            cout << directory << " created." << endl;
+        }
+        else
+        {
+            cout << directory << " NOT created." << endl;
+        }
+    }
+
+    chdir(buffer);
+}
+
+/*  This routine generates file names based on the provide suffix
+//  Inputs: theXMLFileName: typically "conf" or "perf"
+//          suffix:         typically "xsl" or "out".
+//
+//  Notes:  
+*/  
+
+XalanDOMString
+FileUtility::generateFileName(
+            const XalanDOMString&   theXMLFileName,
+            const char*             suffix,
+            bool*                   status)
+{
+    XalanDOMString  targetFile;
+    int             thePeriodIndex = -1;
+    const int       theLength = length(theXMLFileName);
+
+    for (int i = theLength - 1; i > 0; i--)
+    {
+        if (charAt(theXMLFileName, i) == XalanUnicode::charFullStop)
+        {
+            thePeriodIndex = i;        // charFullStop is the dot (x2E)
+            break;
+        }
+    }
+
+    if (thePeriodIndex != -1)
+    {
+        targetFile.assign(theXMLFileName, 0, thePeriodIndex + 1);
+
+        targetFile += XalanDOMString(suffix);
+    }
+
+    // Check the .xml file exists.
+    if (!strcmp(suffix,"xml"))
+    {
+        FILE* fileHandle = fopen(c_str(TranscodeToLocalCodePage(targetFile)), "r");
+        if (fileHandle == 0)
+        {
+            cout << "TEST ERROR: File Missing: " << targetFile << endl;
+
+            if (status != 0)
+            {
+                *status = false;
+            }
+        }
+        else
+        {
+            fclose(fileHandle);
+        }
+    }
+
+    return targetFile;
+}
+
+
+/*  This routine generates a Unique Runid. 
+//  Inputs: None
+//          
+//  Notes: The format is mmddhhmm. For example
+//         03151046 is "Mar 15 10:46"   
+*/
+
+XalanDOMString
+FileUtility::generateUniqRunid()
+{
+#if defined(XALAN_STRICT_ANSI_HEADERS)
+    using std::tm;
+    using std::time;
+    using std::localtime;
+    using std::strftime;
+#endif
+
+    struct tm *newtime;
+    time_t long_time;
+    char tmpbuf[10];
+
+    time( &long_time );                /* Get time as long integer. */
+    newtime = localtime( &long_time ); /* Convert to local time. */
+
+    strftime( tmpbuf, 10,"%m%d%H%M",newtime );
+
+    return XalanDOMString(tmpbuf);
+}
+
+
+//  This routine gets Xerces Version number. It's used to put the Xerces Version
+//  into the output xml results file as an attribute of 'PerfData' element.
+//  Inputs: None
+//              
+
+XalanDOMString
+FileUtility::getXercesVersion()
+{
+
+    return XalanDOMString(gXercesFullVersionStr);
+}
+
+/*  This routine creates a FormatterToXML FormatterListener. This is used to format
+//  the output DOM so a comparision can be done with the expected GOLD file. 
+//  Inputs: None
+//              
+*/
+
+
+FormatterListener* 
+FileUtility::getXMLFormatter(
+            PrintWriter&            resultWriter,
+            int                     indentAmount,
+            const XalanDOMString&   mimeEncoding,
+            const StylesheetRoot*   stylesheet)
+{
+    XalanDOMString  version;
+    bool            outputIndent= 0;
+    XalanDOMString  mediatype;
+    XalanDOMString  doctypeSystem;
+    XalanDOMString  doctypePublic;
+    XalanDOMString  standalone;
+
+    if (stylesheet != 0)
+    {
+        version = stylesheet->getOutputVersion();
+
+        mediatype = stylesheet->getOutputMediaType();
+        doctypeSystem = stylesheet->getOutputDoctypeSystem();
+        doctypePublic = stylesheet->getOutputDoctypePublic();
+        standalone = stylesheet->getOutputStandalone();
+        outputIndent = stylesheet->getOutputIndent();
+    }
+
+    return new FormatterToXML(
+                    resultWriter,
+                    version,
+                    outputIndent,
+                    indentAmount,
+                    mimeEncoding,
+                    mediatype,
+                    doctypeSystem,
+                    doctypePublic,
+                    true,   // xmlDecl
+                    standalone);
+}
+
+
+/*  This routine is used to compares the results of a transform and report the results.
+//  When a failure is detected the 'data' structure used to report detailed info about 
+//  a failure is filled in.
+//  Inputs: 
+//      goldFile    - Name of gold file
+//      outputFile  - Name of result file.
+//      logfile     - Name of log file reporter.
+//      
+//  Returns: 
+//      Void
+*/
+void
+FileUtility::checkResults(
+            const XalanDOMString&   outputFile, 
+            const XalanDOMString&   goldFile, 
+            XMLFileReporter&        logfile)
+{
+    int ambgFlag = data.nogold; // get the current number of tests w/o gold files.
+
+    // Compare the results, report success if compareSerializedResults returns true.
+    if(compareSerializedResults(outputFile, goldFile))
+    {
+        cout << "Passed: " << data.testOrFile << endl;
+        logfile.logCheckPass(data.testOrFile);
+        data.pass += 1;
+    }
+    else
+    {
+        typedef XMLFileReporter::Hashtable  Hashtable;
+
+        // if the compairson fails gather up the failure data and determine if it failed 
+        // due to bad output or missing Gold file. Lastly, log the failure.
+        Hashtable   attrs;
+        Hashtable   actexp;
+
+        reportError();
+
+        attrs.insert(Hashtable::value_type(XalanDOMString("reason"), XalanDOMString(data.msg)));
+        attrs.insert(Hashtable::value_type(XalanDOMString("atNode"), data.currentNode));
+        actexp.insert(Hashtable::value_type(XalanDOMString("exp"), data.expected));
+        actexp.insert(Hashtable::value_type(XalanDOMString("act"), data.actual));
+
+        actexp.insert(Hashtable::value_type(XalanDOMString("xsl"), data.xslFileURL));
+        actexp.insert(Hashtable::value_type(XalanDOMString("xml"), data.xmlFileURL));
+        actexp.insert(Hashtable::value_type(XalanDOMString("result"), outputFile));
+        actexp.insert(Hashtable::value_type(XalanDOMString("gold"), goldFile));
+
+        if (ambgFlag < data.nogold)
+        {
+            logfile.logCheckAmbiguous(data.testOrFile);
+        }
+        else
+        {
+            logfile.logCheckFail(data.testOrFile, attrs, actexp);
+        }
+    }
+
+}
+
+void
+FileUtility::checkAPIResults(
+            const XalanDOMString&   actual, 
+            const XalanDOMString&   expected, 
+            const char*             msg,
+            XMLFileReporter&        logfile,
+            const XalanDOMString&   outputFile, 
+            const XalanDOMString&   goldFile,
+            bool                    containsOnly)
+{
+    if(actual == expected ||
+       (containsOnly == true && indexOf(actual, expected) != XalanDOMString::npos))
+    {
+        data.pass += 1;
+        cout << "Passed: " << data.testOrFile << endl;
+        logfile.logCheckPass(data.testOrFile);
+    }
+    else
+    {   data.actual = actual;
+        data.expected = expected;
+        data.currentNode = "API Test";
+        data.msg = msg;
+        data.fail += 1;
+
+        reportError();
+
+        typedef XMLFileReporter::Hashtable  Hashtable;
+
+        Hashtable   actexp;
+
+        actexp.insert(Hashtable::value_type(XalanDOMString("exp"), expected));
+        actexp.insert(Hashtable::value_type(XalanDOMString("act"), actual));
+        actexp.insert(Hashtable::value_type(XalanDOMString("xsl"), data.xslFileURL));
+        actexp.insert(Hashtable::value_type(XalanDOMString("xml"), data.xmlFileURL));
+        actexp.insert(Hashtable::value_type(XalanDOMString("result"), outputFile));
+        actexp.insert(Hashtable::value_type(XalanDOMString("gold"), goldFile));
+
+        // Todo: Need to determine if I should check for missing gold in these cases.
+        logfile.logCheckFail(data.testOrFile, actexp);
+    }
+}
+
+
+
+/*  This routine compares the results of a transform with the gold file.
+//  It in turn call the domCompare routine to do the actual comparision. 
+//  Inputs: 
+//      gold - Dom tree for the expected results
+//      doc  - Dom tree created during transformation
+//      filename - Current filename
+//      
+//  Returns: 
+//      Void
+//      
+*/
+void
+FileUtility::checkDOMResults(
+            const XalanDOMString&           theOutputFile, 
+            const XalanCompiledStylesheet*  compiledSS, 
+            const XalanSourceTreeDocument*  dom,
+            const XSLTInputSource&          goldInputSource,
+            XMLFileReporter&                logfile)
+{
+    const int   ambgFlag = data.nogold;
+
+    const XalanDOMString    mimeEncoding("");
+
+    XalanFileOutputStream           myOutput(theOutputFile);
+    XalanOutputStreamPrintWriter    myResultWriter(myOutput);
+
+    FormatterListener* const    theFormatter =
+        getXMLFormatter(
+            myResultWriter,
+            0,
+            mimeEncoding,
+            compiledSS->getStylesheetRoot());
+
+    FormatterTreeWalker     theTreeWalker(*theFormatter);
+
+    theTreeWalker.traverse(dom);
+
+    delete theFormatter;
+
+    XalanSourceTreeDOMSupport       domSupport;
+    XalanSourceTreeParserLiaison    parserLiaison(domSupport);
+    
+    domSupport.setParserLiaison(&parserLiaison);
+
+    const XalanDocument* const  goldDom =
+        parserLiaison.parseXMLStream(goldInputSource);
+
+    if(domCompare(*goldDom, *dom))
+    {
+        cout << "Passed: " << data.testOrFile << endl;
+        logfile.logCheckPass(data.testOrFile);
+        data.pass += 1;
+    }
+    else
+    {
+        typedef XMLFileReporter::Hashtable  Hashtable;
+
+        // if the compairson fails gather up the failure data and determine if it failed 
+        // due to bad output or missing Gold file. Lastly, log the failure.
+        Hashtable attrs;
+        Hashtable actexp;
+
+        reportError();
+
+        attrs.insert(Hashtable::value_type(XalanDOMString("reason"), XalanDOMString(data.msg)));
+        attrs.insert(Hashtable::value_type(XalanDOMString("atNode"), data.currentNode));
+        actexp.insert(Hashtable::value_type(XalanDOMString("exp"), data.expected));
+        actexp.insert(Hashtable::value_type(XalanDOMString("act"), data.actual));
+
+        if (ambgFlag < data.nogold)
+        {
+            logfile.logCheckAmbiguous(data.testOrFile);
+        }
+        else
+        {
+            logfile.logCheckFail(data.testOrFile, attrs, actexp);
+        }
+    }
+}
+
+/*  This routine takes the result file and gold file and parses them.
+//  If either of the files fails to parse and a SAXException is throw,
+//  then the files are compared using a char by char file compare,
+//  otherwise the domCompare routine is used.
+//  Inputs: 
+//      outputFile:  Name of result file
+//      goldFile:    Name of gold file
+//      
+//  Returns: 
+//      True or False
+//      
+*/
+bool
+FileUtility::compareSerializedResults(
+            const XalanDOMString&   outputFile,
+            const XalanDOMString&   goldFile)
+{
+
+    const XSLTInputSource resultInputSource(outputFile);
+    const XSLTInputSource goldInputSource(goldFile);
+
+    XalanSourceTreeDOMSupport       domSupport;
+    XalanSourceTreeParserLiaison    parserLiaison(domSupport);
+
+    domSupport.setParserLiaison(&parserLiaison);
+
+    try
+    {
+        const XalanDocument* const  transformDom =
+            parserLiaison.parseXMLStream(resultInputSource);
+        assert(transformDom != 0);
+
+        const XalanDocument* const  goldDom =
+            parserLiaison.parseXMLStream(goldInputSource);
+        assert(goldDom != 0);
+
+        return domCompare(*goldDom, *transformDom);
+    }
+    // This exception is being reported prior to this Catch, however, however, I clarify that it's a SAX exception.
+    // It's a good indication that the Gold file is not a valid XML.  When this happens the transform result needs
+    // to be compared with the Gold,  with a character by character basis,  not via the DOM compair. 
+    catch (const XERCES_CPP_NAMESPACE_QUALIFIER SAXException&)
+    {
+        cout << "SAXException: Using fileCompare to check output.\n";
+
+        return fileCompare(c_str(TranscodeToLocalCodePage(goldFile)), c_str(TranscodeToLocalCodePage(outputFile)));
+    }
+ 
+}
+
+
+
+static void
+replaceNonAsciiCharacters(
+            char*   theBuffer,
+            char    theReplacementChar)
+{
+    while(*theBuffer)
+    {
+        if (unsigned(*theBuffer) > 127)
+        {
+            *theBuffer = theReplacementChar;
+        }
+
+        ++theBuffer;
+    }
+}
+
+
+
+/*  This routine is used to compare the results against the gold when one or both of 
+//  fails to parse without throwing a SAXException. When a failure is detected the 'data' 
+//  structure used to report detailed info about a failure is filled in.
+//  Inputs: 
+//      outputFile:  Name of result file
+//      goldFile:    Name of gold file
+//      
+//  Returns: 
+//      True or False
+//      
+*/
+bool
+FileUtility::fileCompare(
+            const char*     goldFile,
+            const char*     outputFile)
+{
+    const unsigned long     maxBuffer = 132;
+
+    char rline[maxBuffer] = {'0'};  // declare buffers to hold single line from file
+    char gline[maxBuffer] = {'0'};  
+    char temp[10];              // buffer to hold line number
+    char lineNum = 1;
+
+    // Set fail data incase there are i/o problems with the files to compare.
+    data.expected = XalanDOMString(" ");
+    data.actual = XalanDOMString(" ");
+    data.currentNode = XalanDOMString("Line: 0");
+
+    // Attempt to open the files. 
+    FILE* const     result = fopen(outputFile, "r");
+    FILE* const     gold = fopen(goldFile, "r");
+
+    // If the result file fails to open report this as a failure.
+    if (!result)
+    {
+        data.msg = "No Result (Transform failed)";
+        data.fail += 1;
+        return false;
+    }
+
+    // If the gold file fails to open report this as ambiguous.
+    if (!gold)
+    {
+        data.msg = "No Gold file";
+        data.nogold += 1;
+        return false;
+    }
+
+    // Start file comparison,  line by line..
+    while(!feof(result) && !feof(gold))
+    {
+        fgets(gline, sizeof(gline), gold );
+        fgets(rline, sizeof(rline), result );
+        sprintf(temp,"%d",lineNum);
+
+        if (ferror(gold) || ferror(result))
+        {
+            data.msg = "Read Error - Gold/Result file";
+            data.currentNode = XalanDOMString("Line: ") + XalanDOMString(temp);
+            return false;
+        }
+
+        // Compare the lines character by charcter ....
+        unsigned int i = 0;
+        while(i < strlen(gline)) 
+        {
+            if (gline[i] == rline[i]) 
+            {
+                i++;
+            }
+            else
+            {   // If there is a mismatch collect up the fail data and return false.  To ensure that 
+                // the results can be seen in the browser enclose the actual/expected in CDATA Sections.
+
+                // Replace any non-ASCII characters.  Otherwise, we would have to encode them
+                // in UTF-8, which is a huge pain.
+                replaceNonAsciiCharacters(gline, '?');
+                replaceNonAsciiCharacters(rline, '?');
+
+                data.msg = "Text based comparison failure";
+                data.expected = XalanDOMString("<![CDATA[") + XalanDOMString(gline) + XalanDOMString("]]>");
+                data.actual = XalanDOMString("<![CDATA[") + XalanDOMString(rline) + XalanDOMString("]]>");
+                data.currentNode = XalanDOMString("Line: ") + XalanDOMString(temp);
+                data.fail += 1;
+                return false;
+            }
+        }
+
+        lineNum += 1;
+    }
+
+    return true;
+}
+
+
+
+/*  This routine performs a DOM Comparision. 
+//  Inputs: 
+//      gold - Dom tree for the expected results
+//      doc  - Dom tree created during transformation
+//      filename - Current filename
+//      
+//  Returns: 
+//      True or False
+//      
+*/
+bool 
+FileUtility::domCompare(
+            const XalanNode&    gold,
+            const XalanNode&    doc)
+{
+    const XalanNode::NodeType   docNodeType  = doc.getNodeType();
+    const XalanNode::NodeType   goldNodeType = gold.getNodeType();
+
+    const XalanDOMString&  docNodeName  = doc.getNodeName();    
+
+    if (goldNodeType != docNodeType)
+    {
+        collectData("NodeType mismatch.",
+                    docNodeName,
+                    XalanDOMString(xalanNodeTypes[docNodeType]),
+                    XalanDOMString(xalanNodeTypes[goldNodeType]));
+
+        return false;
+    }
+
+    switch (goldNodeType)
+    {
+    case XalanNode::ELEMENT_NODE:   // ATTRIBUTE_NODEs are processed with diffElement().
+        { 
+            if (diffElement(gold, doc) == false) 
+            {
+                return false;
+            }
+        }
+        break;
+
+    case XalanNode::CDATA_SECTION_NODE:
+    case XalanNode::TEXT_NODE:  
+        {
+            const XalanDOMString&   docNodeValue  = doc.getNodeValue();
+            const XalanDOMString&   goldNodeValue = gold.getNodeValue();
+            
+            //debugNodeData(docNodeName, docNodeValue);
+            
+            if(goldNodeValue != docNodeValue)
+            {
+                collectData("Text node mismatch. ", 
+                             docNodeName,
+                             goldNodeValue,
+                             docNodeValue);
+                return false;
+            }
+        }
+        break;
+
+    case XalanNode::PROCESSING_INSTRUCTION_NODE:
+        {
+            const XalanDOMString&  goldNodeName  = gold.getNodeName();
+
+            if (goldNodeName != docNodeName)
+            {
+                collectData("processing-instruction target mismatch. ", 
+                             docNodeName,
+                             goldNodeName,
+                             docNodeName);
+
+                return false;
+            }
+            else
+            {
+                const XalanDOMString&   docNodeValue  = doc.getNodeValue();
+                const XalanDOMString&   goldNodeValue = gold.getNodeValue();
+
+                if (goldNodeValue != docNodeValue)
+                {
+                    collectData("processing-instruction data mismatch. ", 
+                                 docNodeName,
+                                 goldNodeValue,
+                                 docNodeValue);
+
+                    return false;
+                }
+            }
+        }
+        break;
+
+    case XalanNode::COMMENT_NODE:
+        {
+            const XalanDOMString&   docNodeValue  = doc.getNodeValue();
+            const XalanDOMString&   goldNodeValue = gold.getNodeValue();
+
+            if (goldNodeValue != docNodeValue)
+            {
+                collectData("comment data mismatch. ", 
+                             docNodeName,
+                             goldNodeValue,
+                             docNodeValue);
+
+                return false;
+            }
+        }
+        break;
+
+    case XalanNode::DOCUMENT_NODE:
+        {
+            //debugNodeData(docNodeName);
+
+            const XalanNode *goldNextNode;
+            const XalanNode *domNextNode;
+
+            goldNextNode = gold.getFirstChild();
+            domNextNode = doc.getFirstChild();
+
+            if (0 != goldNextNode)
+            {
+                if(domCompare(*goldNextNode,*domNextNode) == false)
+                {
+                    return false;
+                }
+            }
+        }
+        break;
+
+    case XalanNode::ENTITY_REFERENCE_NODE:
+    case XalanNode::ENTITY_NODE:
+    case XalanNode::DOCUMENT_TYPE_NODE:
+    case XalanNode::DOCUMENT_FRAGMENT_NODE:
+    case XalanNode::NOTATION_NODE:
+    default:
+        cerr << "Unexpected node type: " << goldNodeType << endl;
+
+        return false;
+    }
+
+    // Need to process siblings.  Children are processed in diffElement, since
+    // only they can have children in the XPath data model.
+    const XalanNode* const  goldNextNode = gold.getNextSibling();
+    const XalanNode* const  domNextNode = doc.getNextSibling();
+
+    if (0 != goldNextNode)
+    {
+        if (0 != domNextNode)
+        {
+            if (domCompare(*goldNextNode, *domNextNode) == false)
+            {
+                return false;
+            }
+        }
+        else
+        {
+            collectData("Missing sibling node. ", 
+                     docNodeName,
+                     goldNextNode->getNodeName(),
+                     goldNextNode->getNodeName());
+
+            return false;
+        }
+    }
+    else if (0 != domNextNode)
+    {
+        collectData("Extra sibling node. ", 
+            docNodeName,
+            domNextNode->getNodeName(),
+            domNextNode->getNodeName());
+
+        return false;
+    }
+
+    return true;
+}
+
+
+
+bool 
+FileUtility::domCompare(
+            const XalanDocument&    gold,
+            const XalanDocument&    doc)
+{
+    const XalanNode*    theGoldPos = &gold;
+    const XalanNode*    theDocPos = &doc;
+
+    bool    fEqual = true;
+
+    do
+    {
+        fEqual = diffNode(theGoldPos, theDocPos);
+
+        if (fEqual == true)
+        {
+            assert(theGoldPos != 0 && theDocPos != 0);
+
+            const XalanNode*    nextGoldNode = theGoldPos->getFirstChild();
+            const XalanNode*    nextDocNode = theDocPos->getFirstChild();
+
+            bool    fBreak = false;
+
+            while(
+                nextGoldNode == 0 &&
+                nextDocNode == 0 &&
+                fBreak == false)
+            {
+                // Move to the next sibling of each node,
+                // since we would get here only if both have
+                // no children.
+                nextGoldNode = theGoldPos->getNextSibling();
+                nextDocNode = theDocPos->getNextSibling();
+
+                // If there is no next sibling, move up to the
+                // parent.  If one, but not both, has a sibling,
+                // we'll end up back at the top of the do/while
+                // loop and the difference will be reported.
+                if(0 == nextGoldNode && 0 == nextDocNode)
+                {
+                    theGoldPos = theGoldPos->getParentNode();
+                    theDocPos = theDocPos->getParentNode();
+
+                    // If the parent is null, then we've reached
+                    // the end of the document.  Note that if we
+                    // got here, then there must also be a parent
+                    // node in the document we're verifying, so we
+                    // could simply assert that theDocPos is either
+                    // null if theGoldPos is null, or it is not-null
+                    // if theGoldPos is not-null.
+                    if(0 == theGoldPos)
+                    {
+                        nextGoldNode = theGoldPos;
+
+                        fBreak = true;
+                    }
+
+                    if(0 == theDocPos)
+                    {
+                        nextDocNode = theDocPos;
+
+                        fBreak = true;
+                    }
+                }
+            }
+
+            theGoldPos = nextGoldNode;
+            theDocPos = nextDocNode;
+        }
+    } while((theGoldPos != 0 || theDocPos != 0) && fEqual == true);
+
+
+    return fEqual;
+}
+
+
+
+bool
+FileUtility::diffNode(
+            const XalanNode&    gold,
+            const XalanNode&    doc)
+{
+    const XalanNode::NodeType   docNodeType  = doc.getNodeType();
+    const XalanNode::NodeType   goldNodeType = gold.getNodeType();
+
+    const XalanDOMString&  docNodeName  = doc.getNodeName();    
+
+    if (goldNodeType != docNodeType)
+    {
+        collectData("NodeType mismatch.",
+                    docNodeName,
+                    XalanDOMString(xalanNodeTypes[docNodeType]),
+                    XalanDOMString(xalanNodeTypes[goldNodeType]));
+
+        return false;
+    }
+
+    switch (goldNodeType)
+    {
+    case XalanNode::ELEMENT_NODE:   // ATTRIBUTE_NODEs are processed with diffElement().
+        return diffElement2(gold, doc);
+        break;
+
+    case XalanNode::CDATA_SECTION_NODE:
+    case XalanNode::TEXT_NODE:  
+        {
+            const XalanDOMString&   docNodeValue  = doc.getNodeValue();
+            const XalanDOMString&   goldNodeValue = gold.getNodeValue();
+            
+            //debugNodeData(docNodeName, docNodeValue);
+            
+            if(goldNodeValue != docNodeValue)
+            {
+                collectData("Text node mismatch. ", 
+                             docNodeName,
+                             goldNodeValue,
+                             docNodeValue);
+                return false;
+            }
+        }
+        break;
+
+    case XalanNode::PROCESSING_INSTRUCTION_NODE:
+        {
+            const XalanDOMString&  goldNodeName  = gold.getNodeName();
+
+            if (goldNodeName != docNodeName)
+            {
+                collectData("processing-instruction target mismatch. ", 
+                             docNodeName,
+                             goldNodeName,
+                             docNodeName);
+
+                return false;
+            }
+            else
+            {
+                const XalanDOMString&   docNodeValue  = doc.getNodeValue();
+                const XalanDOMString&   goldNodeValue = gold.getNodeValue();
+
+                if (goldNodeValue != docNodeValue)
+                {
+                    collectData("processing-instruction data mismatch. ", 
+                                 docNodeName,
+                                 goldNodeValue,
+                                 docNodeValue);
+
+                    return false;
+                }
+            }
+        }
+        break;
+
+    case XalanNode::COMMENT_NODE:
+        {
+            const XalanDOMString&   docNodeValue  = doc.getNodeValue();
+            const XalanDOMString&   goldNodeValue = gold.getNodeValue();
+
+            if (goldNodeValue != docNodeValue)
+            {
+                collectData("comment data mismatch. ", 
+                             docNodeName,
+                             goldNodeValue,
+                             docNodeValue);
+
+                return false;
+            }
+        }
+        break;
+
+    case XalanNode::DOCUMENT_NODE:
+        break;
+
+    case XalanNode::ENTITY_REFERENCE_NODE:
+    case XalanNode::ENTITY_NODE:
+    case XalanNode::DOCUMENT_TYPE_NODE:
+    case XalanNode::DOCUMENT_FRAGMENT_NODE:
+    case XalanNode::NOTATION_NODE:
+    default:
+        cerr << "Unexpected node type: " << goldNodeType << endl;
+
+        return false;
+    }
+
+    return true;
+}
+
+
+
+bool
+FileUtility::diffNode(
+            const XalanNode*    gold,
+            const XalanNode*    doc)
+{
+    if (gold != 0 && doc != 0)
+    {
+        return diffNode(*gold, *doc);
+    }
+    else if (gold != 0)
+    {
+        const XalanNode* const  parent =
+            gold->getParentNode();
+
+        collectData(
+            "Missing sibling node. ",
+            parent == 0 ? s_emptyString : parent->getNodeName(),
+            s_emptyString,
+            gold->getNodeName());
+
+        return false;
+    }
+    else
+    {
+        assert(doc != 0 && gold == 0);
+
+        const XalanNode* const  parent =
+            doc->getParentNode();
+
+        collectData(
+            "Extra sibling node. ", 
+            parent == 0 ? s_emptyString : parent->getNodeName(),
+            doc->getNodeName(),
+            s_emptyString);
+
+        return false;
+    }
+}
+
+
+
+/*  This routine compares two element nodes. 
+//  Inputs: 
+//      gold - Dom tree for the expected results
+//      doc  - Dom tree created during transformation
+//      filename - Current filenam
+//      
+//  Returns: 
+//      True or False
+//                      
+*/
+
+bool
+FileUtility::diffElement(
+            const XalanNode&    gold,
+            const XalanNode&    doc)
+{
+    assert(gold.getNodeType() == XalanNode::ELEMENT_NODE);
+    assert(gold.getNodeType() == XalanNode::ELEMENT_NODE);
+
+    const XalanDOMString&  docNodeName  = doc.getNodeName();    
+    const XalanDOMString&  goldNodeName = gold.getNodeName();
+
+    const XalanDOMString&  docNsUri  = doc.getNamespaceURI();
+    const XalanDOMString&  goldNsUri = gold.getNamespaceURI();
+
+    //debugNodeData(docNodeName);
+
+    // This essentially checks 2 things, that the prefix and localname are the
+    // same.  So specific checks of these items are not necessary.
+    if (goldNodeName != docNodeName)
+    {
+        collectData("Element mismatch. ", 
+                         docNodeName,
+                         goldNodeName,
+                         docNodeName);
+        return false;
+    }
+
+    if ( goldNsUri != docNsUri)
+    {
+        collectData("Element NamespaceURI mismatch. ",
+                         docNodeName,
+                         goldNsUri,
+                         docNsUri);
+        return false;
+    }
+
+    // Get Attributes for each Element Node. 
+    const XalanNamedNodeMap* const  goldAttrs = gold.getAttributes();
+    const XalanNamedNodeMap* const  docAttrs  = doc.getAttributes();
+
+    // Get number of Attributes
+    const unsigned int  numGoldAttr = goldAttrs->getLength();
+    const unsigned int  numDomAttr  = docAttrs ->getLength();
+
+    /*
+    // This needs to be uncommented if 'compare.exe' is to work. 
+    // If this is the 'root' element strip off the xmlns:xml namespace attribute,
+    // that is lurking around on the gold file, but not the dom.  This is necessary
+    // only for the 'compare' test, that uses a pure DOM, that has not been serialized.
+    //if (goldNodeName == XalanDOMString("root"))
+    {
+        numGoldAttr -= 1;
+        XalanNode *gXMLAttr = goldAttrs->item(1);
+    }
+    */
+    // Check that each Element has same number of Attributes. If they don't report error  
+    if ( numGoldAttr == numDomAttr )
+    {
+        // Compare Attributes one at a time.
+        //for (int i=1; i < numGoldAttr; i++)  // To be used with 'compare'
+        for (unsigned int i = 0; i < numGoldAttr; ++i)
+        {
+            // Attribute order is irrelvant, so comparision is base on Attribute name.
+            const XalanNode* const  gAttr = goldAttrs->item(i);
+            const XalanDOMString&   goldAttrName = gAttr->getNodeName();
+
+            const XalanNode* const  dAttr = docAttrs->getNamedItem(goldAttrName);
+
+            if (dAttr != 0)
+            {
+                if( ! (diffAttr(gAttr, dAttr)) )
+                    return false;
+            }
+            else
+            {
+                collectData("Element missing named Attribute. ",
+                         docNodeName,
+                         goldAttrName,
+                         XalanDOMString("NOTHING"));
+
+                return false;
+            }
+        }
+    }
+    else
+    {
+        char  buf1[2], buf2[2];
+        sprintf(buf1, "%u", numGoldAttr);
+        sprintf(buf2, "%u", numDomAttr);
+        collectData("Wrong number of attributes. ",
+                         docNodeName,
+                         XalanDOMString(buf1),
+                         XalanDOMString(buf2));
+        return false;
+    }
+
+    const XalanNode*    goldNextNode = gold.getFirstChild();
+    const XalanNode*    domNextNode = doc.getFirstChild();
+
+    if (0 != goldNextNode)
+    {
+        if (0 != domNextNode)
+        {
+            if ( ! domCompare(*goldNextNode, *domNextNode) )
+                return false;
+        }
+        else
+        {
+            collectData("Element missing ChildNode. ", 
+                         docNodeName,
+                         XalanDOMString(goldNextNode->getNodeName()),
+                         XalanDOMString("NOTHING"));
+            return false;
+        }
+    }
+    else if (domNextNode != 0)
+    {
+        // The result doc has additional Children. If the additional node is a text node
+        // then gather up the text and print it out.
+        if ( domNextNode->getNodeType() == XalanNode::TEXT_NODE)
+        {
+            collectData("Result has additional Child node: ", 
+                    docNodeName,
+                    XalanDOMString("NOTHING"),       
+                    XalanDOMString(domNextNode->getNodeName()) + XalanDOMString("  \"") +
+                    XalanDOMString(domNextNode->getNodeValue()) + XalanDOMString("\""));
+        }
+        // Additional node is NOT text, so just print it's Name.
+        else
+        {
+            collectData("Result has additional Child node: ", 
+                        docNodeName,
+                        XalanDOMString("NOTHING"),       
+                        XalanDOMString(domNextNode->getNodeName()));
+
+        }
+        return false;
+
+    }
+
+    return true;
+}
+
+
+bool
+FileUtility::diffElement2(
+            const XalanNode&    gold,
+            const XalanNode&    doc)
+{
+    assert(gold.getNodeType() == XalanNode::ELEMENT_NODE);
+    assert(gold.getNodeType() == XalanNode::ELEMENT_NODE);
+
+    const XalanDOMString&  docNodeName  = doc.getNodeName();    
+    const XalanDOMString&  goldNodeName = gold.getNodeName();
+
+    const XalanDOMString&  docNsUri  = doc.getNamespaceURI();
+    const XalanDOMString&  goldNsUri = gold.getNamespaceURI();
+
+    //debugNodeData(docNodeName);
+
+    // This essentially checks 2 things, that the prefix and localname are the
+    // same.  So specific checks of these items are not necessary.
+    if (goldNodeName != docNodeName)
+    {
+        collectData("Element mismatch. ", 
+                         docNodeName,
+                         goldNodeName,
+                         docNodeName);
+        return false;
+    }
+
+    if ( goldNsUri != docNsUri)
+    {
+        collectData("Element NamespaceURI mismatch. ",
+                         docNodeName,
+                         goldNsUri,
+                         docNsUri);
+        return false;
+    }
+
+    // Get Attributes for each Element Node. 
+    const XalanNamedNodeMap* const  goldAttrs = gold.getAttributes();
+    assert(goldAttrs != 0);
+
+    const XalanNamedNodeMap* const  docAttrs  = doc.getAttributes();
+    assert(docAttrs != 0);
+
+    // Get number of Attributes
+    const unsigned int  numGoldAttr = goldAttrs->getLength();
+    const unsigned int  numDomAttr  = docAttrs ->getLength();
+
+    // Check that each Element has same number of Attributes. If they don't report error  
+    if ( numGoldAttr == numDomAttr )
+    {
+        // Compare Attributes one at a time.
+        //for (int i=1; i < numGoldAttr; i++)  // To be used with 'compare'
+        for (unsigned int i = 0; i < numGoldAttr; ++i)
+        {
+            // Attribute order is irrelvant, so comparision is base on Attribute name.
+            const XalanNode* const  gAttr = goldAttrs->item(i);
+            const XalanDOMString&   goldAttrName = gAttr->getNodeName();
+
+            const XalanNode* const  dAttr = docAttrs->getNamedItem(goldAttrName);
+
+            if (dAttr != 0)
+            {
+                if( ! (diffAttr(gAttr, dAttr)) )
+                    return false;
+            }
+            else
+            {
+                collectData("Element missing named Attribute. ",
+                         docNodeName,
+                         goldAttrName,
+                         XalanDOMString("NOTHING"));
+
+                return false;
+            }
+        }
+    }
+    else
+    {
+        char  buf1[2], buf2[2];
+        sprintf(buf1, "%u", numGoldAttr);
+        sprintf(buf2, "%u", numDomAttr);
+        collectData("Wrong number of attributes. ",
+                         docNodeName,
+                         XalanDOMString(buf1),
+                         XalanDOMString(buf2));
+        return false;
+    }
+
+    return true;
+}
+
+
+/*  This routine compares two attribute nodes. 
+//  Inputs: 
+//      gAttr - attribute from Gold dom tree 
+//      dAttr - attribute from Dom tree created during transformation
+//      fileName - Current filenam
+//      
+//  Returns: 
+//      True or False
+//              
+*/
+
+bool FileUtility::diffAttr(const XalanNode* gAttr, const XalanNode* dAttr)
+{
+
+    const XalanDOMString&   docAttrName  = dAttr->getNodeName();
+
+    //debugAttributeData(goldAttrName);
+
+    const XalanDOMString&   goldAttrValue = gAttr->getNodeValue();
+    const XalanDOMString&   docAttrValue    = dAttr->getNodeValue();
+
+    if (goldAttrValue != docAttrValue)
+    {
+        collectData(
+            "Attribute Value mismatch. ",
+            docAttrName,
+            goldAttrValue,
+            docAttrValue);
+
+        return false;
+    }
+
+    const XalanDOMString&   goldAttrNsUri = gAttr->getNamespaceURI();
+    const XalanDOMString&   docAttrNsUri    = dAttr->getNamespaceURI();
+
+    if (goldAttrNsUri != docAttrNsUri)
+    {
+        collectData(
+            "Attribute NamespaceURI mismatch. ", 
+            docAttrName,
+            goldAttrNsUri,
+            docAttrNsUri);
+
+        return false;
+    }
+
+    return true;
+}
+
+/*  This routine reports DOM comparison errors. 
+//  Inputs: 
+//      file    -   Name of current file
+//      node    -   Current node that fails
+//      msg     -   Failure message
+//
+*/
+void
+FileUtility::reportError()
+{
+
+    cout << endl
+         << "* Failed "
+         << data.testOrFile
+         << "  Error: "
+         << data.msg
+         << endl
+         << "	"
+         << "Processing Node: "
+         << data.currentNode
+         << endl
+         << "	Expected:	"
+         << data.expected
+         << endl
+         << "	Actual:		"
+         << data.actual
+         << endl
+         << endl;
+}
+
+
+#if !defined(NDEBUG)
+void
+FileUtility::debugNodeData(const XalanDOMString&    value) const
+{
+    cout << "Node is: " << c_str(TranscodeToLocalCodePage(value)) << endl;
+}
+
+
+
+void
+FileUtility::debugNodeData(
+            const XalanDOMString&   node,
+            const XalanDOMString&   value) const
+{
+    cout << "Node is: " << c_str(TranscodeToLocalCodePage(node)) << "	"
+         << "Value is: \"" << c_str(TranscodeToLocalCodePage(value)) << "\"\n";
+}
+
+
+
+void
+FileUtility::debugAttributeData(const XalanDOMString&   value) const
+{
+    cout << "Attribute is: " << c_str(TranscodeToLocalCodePage(value)) << endl;
+}
+
+#endif
+
+
+
+/*  This routine collects up data pertinent to a dom comparison failure. 
+//  Inputs: 
+//      errmsg:         Reason for the failure.
+//      currentnode:    Node in the dom tree where the mismatch occured
+//      expdata:        Expected data based on the Gold file.
+//      actdata:        Actual data returned in the result file.
+//  Returns: Void                       
+*/
+void 
+FileUtility::collectData(
+            const char*             errmsg,
+            const XalanDOMString&   currentnode,
+            const XalanDOMString&   expdata,
+            const XalanDOMString&   actdata)
+{
+    data.msg = errmsg;
+    data.currentNode = currentnode;
+    data.expected = expdata;
+    data.actual = actdata;
+    data.fail += 1;
+}
+
+
+/*  Routine prints the result to the console, as well as adds summary info into the logfile. 
+//  Inputs: 
+//      logfile:    Current log file
+//      runid:      Unique runid
+//  Returns: Void                       
+*/
+void
+FileUtility::reportPassFail(
+            XMLFileReporter&        logfile,
+            const XalanDOMString&   runid)
+{
+    typedef XMLFileReporter::Hashtable  Hashtable;
+
+    Hashtable   runResults;
+
+    char temp[5];
+
+    // Create entrys that contain runid, xerces version, and numbers for Pass, Fail and No Gold.
+
+    runResults.insert(Hashtable::value_type(XalanDOMString("UniqRunid"), runid));
+    runResults.insert(Hashtable::value_type(XalanDOMString("Xerces-Version "), getXercesVersion()));
+    runResults.insert(Hashtable::value_type(XalanDOMString("BaseDrive "), XalanDOMString(getDrive())));
+    runResults.insert(Hashtable::value_type(XalanDOMString("TestBase "), XalanDOMString(args.base)));
+    runResults.insert(Hashtable::value_type(XalanDOMString("xmlFormat "), data.xmlFormat));
+    sprintf(temp, "%ld", args.iters);
+    runResults.insert(Hashtable::value_type(XalanDOMString("Iters "), XalanDOMString(temp)));
+
+    sprintf(temp, "%d", data.pass);
+    runResults.insert(Hashtable::value_type(XalanDOMString("Passed"), XalanDOMString(temp)));
+    
+    sprintf(temp, "%d", data.fail);
+    runResults.insert(Hashtable::value_type(XalanDOMString("Failed"), XalanDOMString(temp)));
+
+    sprintf(temp, "%d", data.nogold);
+    runResults.insert(Hashtable::value_type(XalanDOMString("No_Gold_Files"), XalanDOMString(temp)));
+
+    logfile.logElementWAttrs(10, "RunResults", runResults, "xxx");  
+
+    cout << "\nPassed " << data.pass;
+    cout << "\nFailed " << data.fail;
+    cout << "\nMissing Gold " << data.nogold << endl;
+
+}
+
+/*  Routine runs a stylesheet on the log file and displays the results in HTML. 
+//  Inputs: 
+//      xalan:          An instance of the transformer
+//      resultsFile:    logfile 
+//  Returns: Void                       
+*/
+void
+FileUtility::analyzeResults(XalanTransformer& xalan, const XalanDOMString& resultsFile)
+{
+    XalanDOMString paramValue;
+    bool    fileStatus;
+
+    // Pass the results .xml file as a parameter to the stylesheet.  It must be wrapped in single
+    // quotes so that it is not considered an expression.
+    //
+    assign(paramValue, XalanDOMString("'"));
+    append(paramValue, resultsFile);
+    append(paramValue, XalanDOMString("'"));
+
+    // Set the parameter
+    //
+    xalan.setStylesheetParam(XalanDOMString("testfile"), paramValue);
+
+    // Generate the input and output file names.
+    //
+    const XalanDOMString  theHTMLFile = generateFileName(resultsFile,"html", &fileStatus);
+    const XalanDOMString  theStylesheet = args.base + XalanDOMString("cconf.xsl");
+    const XalanDOMString  theXMLSource = args.base + XalanDOMString("cconf.xml");
+
+    // Check that we can find the stylesheet to analyze the results.
+    //
+    FILE* fileHandle = fopen(c_str(TranscodeToLocalCodePage(theStylesheet)), "r");
+    if (fileHandle == 0)
+    {
+        cout << "ANALYSIS ERROR: File Missing: " << c_str(TranscodeToLocalCodePage(theStylesheet)) << endl;
+        return;
+    }
+    else
+    {
+        fclose(fileHandle);
+    }
+
+    // Create the InputSources and ResultTarget.
+    const XSLTInputSource   xslInputSource(theStylesheet);
+    const XSLTInputSource   xmlInputSource(theXMLSource);
+    const XSLTResultTarget  resultFile(theHTMLFile);
+
+    // Do the transform, display the output HTML, or report any failure.
+    const int   result = xalan.transform(xmlInputSource, xslInputSource, resultFile);
+
+    if (result == 0)
+    {
+        system(c_str(TranscodeToLocalCodePage(theHTMLFile)));
+    }
+    else 
+    {
+        cout << "Analysis failed due to following error: "
+             << xalan.getLastError()
+             << endl;
+    }   
+}
+
+
+
+static XalanDOMString   s_staticXmlSuffix;
+static XalanDOMString   s_staticPathSep;
+
+
+
+const XalanDOMString&   FileUtility::s_xmlSuffix = s_staticXmlSuffix;
+const XalanDOMString&   FileUtility::s_pathSep = s_staticPathSep;
+
+
+
+void
+FileUtility::initialize()
+{
+    s_staticXmlSuffix = XALAN_STATIC_UCODE_STRING(".xml");
+
+#if defined(WIN32)
+    s_staticPathSep = XALAN_STATIC_UCODE_STRING("\\");
+#else
+    s_staticPathSep = XALAN_STATIC_UCODE_STRING("/");
+#endif
+}
+
+
+
+void
+FileUtility::terminate()
+{
+    releaseMemory(s_staticXmlSuffix);
+    releaseMemory(s_staticPathSep);
+}
+
+
+
+XALAN_CPP_NAMESPACE_END
--- xalan-1.10.orig/c/Tests/Harness/Harness.rc
+++ xalan-1.10/c/Tests/Harness/Harness.rc
@@ -0,0 +1,111 @@
+//Microsoft Developer Studio generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifndef _MAC
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,8,0,0
+ PRODUCTVERSION 1,8,0,0
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x40004L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904b0"
+        BEGIN
+            VALUE "Comments", "Dynamic linked library for Xalan-C++\0"
+            VALUE "CompanyName", "Apache Software Foundation\0"
+            VALUE "FileDescription", "Dynamic Link Library for Xalan-C++ Version 1.8.0\0"
+            VALUE "FileVersion", "1, 8, 0, 0\0"
+            VALUE "InternalName", "Harness_1_8_0.dll\0"
+            VALUE "LegalCopyright", "Copyright © Apache Software Foundation 1999-2004. Subject to licensing terms\0"
+            VALUE "LegalTrademarks", "\0"
+            VALUE "OriginalFilename", "Harness_1_8_0.dll\0"
+            VALUE "PrivateBuild", "\0"
+            VALUE "ProductName", "Xalan-C++ Version 1.7.0\0"
+            VALUE "ProductVersion", "1, 8, 0, 0\0"
+            VALUE "SpecialBuild", "\0"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x409, 1200
+    END
+END
+
+#endif    // !_MAC
+
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "#include ""afxres.h""\r\n"
+    "\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+#endif    // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+
--- xalan-1.10.orig/c/Tests/Harness/XMLFileReporter.hpp
+++ xalan-1.10/c/Tests/Harness/XMLFileReporter.hpp
@@ -0,0 +1,377 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#if !defined(HARNESS_HEADER_GUARD_1357924680)
+#define HARNESS_HEADER_GUARD_1357924680
+
+
+
+#include <Harness/HarnessDefinitions.hpp>
+
+
+
+#include <cstdio>
+#include <map>
+
+
+
+#include <xalanc/XalanDOM/XalanDOMString.hpp>
+
+
+
+XALAN_CPP_NAMESPACE_BEGIN
+
+
+
+// This class is exported from the Harness.dll
+class HARNESS_API XMLFileReporter 
+{
+public:
+
+#if defined(XALAN_NO_STD_NAMESPACE)
+	typedef map<XalanDOMString, XalanDOMString, less<XalanDOMString> >	Hashtable;
+#else
+	typedef std::map<XalanDOMString, XalanDOMString>	Hashtable;
+#endif
+
+#if defined(XALAN_STRICT_ANSI_HEADERS)
+	typedef std::FILE	FileHandleType;
+#else
+	typedef FILE		FileHandleType;
+#endif
+
+public:
+
+
+	// Construct and initialize this reporter with specified filename, if
+	// the filename is not empty.
+	XMLFileReporter(const XalanDOMString& fileName = XalanDOMString());
+
+	// Initialize this XMLFileReporter.  Must be called before attempting to log anything.
+	bool initialize();
+
+	// Accessor for flushing; is set from properties.
+	bool getFlushOnCaseClose();
+
+	// Accessor methods for our properties block.
+	const XalanDOMString& getFileName() const;
+
+	// Accessor methods for our properties block.
+	void setFileName(const XalanDOMString& fileName);
+
+	// Accessor methods for our properties block.
+	void setFileName(const char* fileName)
+	{
+		setFileName(XalanDOMString(fileName));
+	}
+
+	//
+	// Is this Reporter still running OK?  
+	// @returns status - true if an error has occoured, false if it's still working fine
+	// <P>XMLFileReporter should just about never have errors.</P>
+	bool checkError();
+
+	  
+	//
+	// Is this Reporter ready to log results?  
+	// @returns status - true if it's ready to report, false otherwise
+	bool isReady();
+
+	// Flush this reporter - ensure our File is flushed.
+	void flush();
+
+
+	// Close this reporter - ensure our File, etc. are closed.
+	void close();
+
+	//-----------------------------------------------------
+	//-------- Testfile / Testcase start and stop routines --------
+	//-----------------------------------------------------
+
+	/**
+	* Report that a testfile has started.  
+	* @param msg message to log out
+	*/
+	void logTestFileInit(const XalanDOMString& msg);
+
+	void logTestFileInit(const char*	msg)
+	{
+		logTestFileInit(XalanDOMString(msg));
+	}
+
+	/**
+	* Report that a testfile has finished, and report it's result.  
+	* @param msg message to log out
+	* @param result result of testfile
+	*/
+	void logTestFileClose(const XalanDOMString& msg, const XalanDOMString& result);
+
+	void logTestFileClose(const char* msg, const char* result)
+	{
+		logTestFileClose(XalanDOMString(msg), XalanDOMString(result));	
+	}
+
+	void logTestCaseInit(const XalanDOMString& msg);
+
+	void logTestCaseInit(const char*	msg)
+	{
+		logTestCaseInit(XalanDOMString(msg));
+	}
+
+	/**
+	* Report that a testcase has finished, and report it's result.  
+	* @param msg message to log out
+	* @param result result of testfile
+	*/
+	void logTestCaseClose(const XalanDOMString& msg, const XalanDOMString& result);
+
+	void logTestCaseClose(const char* msg, const char* result)
+	{
+		logTestCaseClose(XalanDOMString(msg), XalanDOMString(result));
+	}
+	//-----------------------------------------------------
+	//-------- Test results reporting and logging routines --------
+	//-----------------------------------------------------
+
+
+	/**
+	* Report a comment to result file with specified severity.  
+	* <P>Record format: &lt;message level="##"&gt;msg&lt;/message&gt;</P>
+	* @param level severity or class of message.
+	* @param msg comment to log out.
+	*/
+	void logMessage(int level, const XalanDOMString& msg);
+
+	/**
+	* Logs out statistics to result file with specified severity.  
+	* <P>Record format: &lt;statistic level="##" desc="msg"&gt;&lt;longval&gt;1234&lt;/longval&gt;&lt;doubleval&gt;1.234&lt;/doubleval&gt;&lt;/statistic&gt;</P>
+	* @param level severity of message.
+	* @param lVal statistic in long format.
+	* @param dVal statistic in double format.
+	* @param msg comment to log out.
+	*/
+	void logStatistic (int level, long lVal, double dVal, const XalanDOMString& msg);
+
+	void logStatistic (int level, long lVal, double dVal, const char*	msg)
+	{
+		logStatistic(level, lVal, dVal, XalanDOMString(msg));
+	}
+
+	// This routine will add an attribute to the attribute list.
+	void addMetricToAttrs(char* desc, double theMetric, Hashtable& attrs);
+
+	/**
+    * Logs out a element to results with specified severity.
+    * Uses user-supplied element name and attribute list.  Currently
+    * attribute values and msg are forced .toString().  Also,
+    * 'level' is forced to be the first attribute of the element.
+    * @param level severity of message.
+    * @param element name of enclosing element
+    * @param attrs hash of name=value attributes; note that the
+    * caller must ensure they're legal XML
+	* @param msg comment to log out.
+	*/
+	void logElementWAttrs(int level, const XalanDOMString& element, Hashtable attrs, const XalanDOMString& msg);
+
+	void logElementWAttrs(int level,  const char* element, Hashtable attrs, const char* msg)
+	{
+		logElementWAttrs(level, XalanDOMString(element), attrs, XalanDOMString(msg));
+	}
+
+	void logElement(int level, const XalanDOMString& element, const XalanDOMString& msg);
+
+	void logElement(const XalanDOMString& element, const XalanDOMString& msg);
+	/**
+	* Report an arbitrary XalanDOMString to result file with specified severity.  
+	* <P>Appends and prepends \\n newline characters at the start and 
+	* end of the message to separate it from the tags.</P>
+	* <P>Record format: &lt;arbitrary level="##"&gt;<BR/>
+	* msg<BR/>
+	* &lt;/arbitrary&gt;
+	* </P>
+	* @param level severity or class of message.
+	* @param msg arbitrary XalanDOMString to log out.
+	*/
+	void logArbitraryMessage (int level, const XalanDOMString& msg);
+
+	/**
+	* Report a complete Hashtable to result file with specified severity.  
+	* <P>Indents each hashitem within the table.</P>
+	* <P>Record format: &lt;hashtable level="##" desc="msg"/&gt;<BR/>
+	* &nbsp;&nbsp;&lt;hashitem key="key1"&gt;value1&lt;/hashitem&gt;<BR/>
+	* &nbsp;&nbsp;&lt;hashitem key="key2"&gt;value2&lt;/hashitem&gt;<BR/>
+	* &lt;/hashtable&gt;
+	* </P>
+	* @param level severity or class of message.
+	* @param hash Hashtable to log the contents of. 
+	* @param msg decription of the Hashtable.
+	*/
+	/*
+	void logHashtable (int level, Hashtable hash, const XalanDOMString& msg);
+	*/
+
+	/**
+	* Writes out a Pass record with comment.  
+	* <P>Record format: &lt;checkresult result="PASS" desc="comment"/&gt;</P>
+	* @param comment comment to log with the pass record.
+	*/
+	void logCheckPass(const XalanDOMString& comment);
+
+	/**
+	* Writes out an ambiguous record with comment.  
+	* <P>Record format: &lt;checkresult result="AMBG" desc="comment"/&gt;</P>
+	* @param comment comment to log with the ambg record.
+	*/
+	void logCheckAmbiguous(const XalanDOMString& comment);
+
+	/**
+	* Writes out a Fail record with comment.  
+	* <P>Record format: &lt;checkresult result="FAIL" desc="comment"/&gt;</P>
+	* @param comment comment to log with the fail record.
+	*/
+	void logCheckFail(const XalanDOMString& comment);
+
+	void logCheckFail(const XalanDOMString& test, Hashtable faildata, Hashtable actexp);
+
+	void logCheckFail(const XalanDOMString& test, Hashtable actexp);
+
+	void logErrorResult(const XalanDOMString& test, const XalanDOMString& reason);
+
+	/**
+	* Writes out a Error record with comment.  
+	* <P>Record format: &lt;checkresult result="ERRR" desc="comment"/&gt;</P>
+	* @param comment comment to log with the error record.
+	*/
+	void logCheckErr(const XalanDOMString& comment);
+
+	/**
+	* Escapes a XalanDOMString to remove <, >, ', &, and " so it's valid XML.  
+	* <P>Stolen mostly from Xalan applet sample.</P>
+	* @param s XalanDOMString to escape.
+	* @return XalanDOMString that has been escaped.
+	*/
+	XalanDOMString escapestring(const XalanDOMString& s);
+
+
+private:
+
+	/**
+	* worker method to dump the xml header and open the resultsfile element.  
+	*/
+	bool startResultsFile();
+
+	/**
+	* worker method to close the resultsfile element.  
+	*/
+	bool closeResultsFile();
+
+	/**
+	* worker method to prints to the resultsfile.  
+	*/
+	bool printToFile(const XalanDOMString& output);
+
+	void
+	initStrings();
+
+	/**
+	* worker method to prints to the resultsfile.  
+	*/
+	XalanDOMString getDateTimeString();
+	
+	/** Key for Properties block that denotes our output filename.  */
+	XalanDOMString	OPT_FILENAME;
+
+	/** XML tagnames for results file structure.  */
+	XalanDOMString	ELEM_RESULTSFILE;
+	XalanDOMString	ELEM_TESTFILE;
+	XalanDOMString	ELEM_FILERESULT;
+	XalanDOMString	ELEM_TESTCASE;
+	XalanDOMString	ELEM_CASERESULT;
+	XalanDOMString	ELEM_CHECKRESULT;
+	XalanDOMString	ELEM_STATISTIC;
+	XalanDOMString	ELEM_LONGVAL;
+	XalanDOMString	ELEM_DOUBLEVAL;
+	XalanDOMString	ELEM_MESSAGE;
+	XalanDOMString	ELEM_ARBITRARY;
+	XalanDOMString	ELEM_HASHTABLE;
+	XalanDOMString	ELEM_HASHITEM;
+
+	/** XML attribute names for results file structure.  */
+	XalanDOMString	ATTR_LEVEL;
+	XalanDOMString	ATTR_DESC;
+	XalanDOMString	ATTR_TIME;
+	XalanDOMString	ATTR_RESULT;
+	XalanDOMString	ATTR_KEY;
+	XalanDOMString	ATTR_FILENAME;
+	XalanDOMString	LESS_THAN;
+	XalanDOMString	GREATER_THAN;
+	XalanDOMString	EQUALS_QUOTE;
+	XalanDOMString	SPACE;
+	XalanDOMString	QUOTE;
+	XalanDOMString	QUOTE_SPACE;
+	XalanDOMString	QUOTE_GREATER_THAN;
+	XalanDOMString	QUOTE_SOLIDUS_GREATER_THAN;
+	XalanDOMString	PASS;
+	XalanDOMString	AMBG;
+	XalanDOMString	ERRR;
+	XalanDOMString	FAIL;
+	XalanDOMString	LESS_THAN_SOLIDUS;
+	XalanDOMString	XML_HEADER;
+	XalanDOMString	REASON_EQUALS_QUOTE;
+
+	/** 
+	* Optimization: for heavy use methods, form pre-defined constants to save on XalanDOMString concatenation.  
+	* <P>Note the indent; must be updated if we ever switch to another indenting method.</P>
+	*/
+	XalanDOMString	TESTCASEINIT_HDR;
+	XalanDOMString	TESTCASECLOSE_HDR;
+	XalanDOMString	MESSAGE_HDR;
+	XalanDOMString	STATISTIC_HDR;
+	XalanDOMString	ARBITRARY_HDR;
+	XalanDOMString	HASHTABLE_HDR;
+	XalanDOMString	HASHITEM_HDR;
+	XalanDOMString	CHECKPASS_HDR;
+	XalanDOMString	CHECKAMBG_HDR;
+	XalanDOMString	CHECKERRR_HDR;
+	XalanDOMString	CHECKFAIL_HDR;
+	XalanDOMString	CHECKFAIL_FTR;
+
+	/** If we have output anything yet.  */
+	bool m_anyOutput;
+
+	/** Name of the file we're outputing to.  */
+	XalanDOMString m_fileName;
+
+	/** File reference and other internal convenience variables.  */
+	FileHandleType* m_fileHandle;
+
+	/** If we're ready to start outputting yet.  */
+	bool m_ready;
+
+	/** If an error has occoured in this Reporter.  */
+	bool m_error;
+
+	/** If we should flush after every logTestCaseClose.  */
+	bool m_flushOnCaseClose;
+
+};        // end of class XMLFileReporter
+
+
+
+XALAN_CPP_NAMESPACE_END
+
+
+
+#endif
